News for hackers. Stuff that matters.
Re:Securing Your Site Like It’s 1999 by SilasX on Wednesday December 12, 2018 @11:52AM (#18665434)
Do you expect a better answer for the second than "use a framework that parses the input in a way that escapes the input such that it's not interpreted as a command"?
Re:Securing Your Site Like It’s 1999 by devinl on Wednesday December 12, 2018 @12:46PM (#18665952)
Prepared statements tend to be the best answer for most cases which is similar to the approach you describe but is natively supported by most SQL dialects and also improves performance.

In my experience, many developers and even experienced security engineers can fail to give this answer though.

Re:Securing Your Site Like It’s 1999 by SilasX on Wednesday December 12, 2018 @12:59PM (#18666078)
That's only relevant to know if you're actually implementing the piece that takes raw input and builds a query out of it, and most devs don't work with that piece on a day-to-day basis.

Knowing that you need to use a framework that takes care of input sanitizing is enough for the typical dev.

Edit: Expecting "prepared statements" as "the" answer seems close to making it a trivia question rather than "sufficient understand for doing the job" question.