News for hackers. Stuff that matters.
Re:Main GNU source repository server compromised by tptacek on Tuesday November 30, 2010 @08:42PM (#1956430)
There's almost nothing wrong with your second "trick" (when we write recommendations, we usually suggest people never allow users to directly write syntax, and that they structure their app so that the parameters the user sees couldn't possibly land in SQL; use "1" for "ASC" and "0" for "DESC", etc).

But it's not nearly as powerful a statement to say "use parameterized queries and then do everything else right" as it is to say "just use parameterized queries and you won't have this problem", is it?

Re:Main GNU source repository server compromised by Dylan16807 on Wednesday December 01, 2010 @01:40PM (#1958954)
How about "only pass user-sourced data in parameters"? So anything that isn't a parameter is coming from the app, possibly as a response to user data, but not actually from user data. This statement seems just as powerful as the original. Anything misleading about it? Somewhere you can't use parameters and can't simply use app-supplied query pieces?
Re:Main GNU source repository server compromised by tptacek on Wednesday December 01, 2010 @01:47PM (#1958995)
You see how we're converging on "just use proper input validation", which is the all-time least useful piece of advice in software security?
Re:Main GNU source repository server compromised by Dylan16807 on Wednesday December 01, 2010 @11:04PM (#1960966)
Because input validation is hard to do. A rule to not pass input EVER (outside of parameters), even in a supposedly validated form, is something different.