Re:Two Active Record SQL Injection Vulnerabilities Affecting...
by warmwaffles on Wednesday July 02, 2014 @06:43PM
(#7980301)
That's not what OP was saying. That SQL string you just provided is static. At some point the ORM has to assemble that string.
This way the query sent to the server looks like this:
And then the parameters are passed to the database server separately to bind to the above placeholders.This way the database server knows what is user provided data and what is part of the SQL, and no special quoting is required since the database server handles that internally. It's much safer in that SQL injection becomes impossible at that point.