by eoftedal · 13y ago · 0 comments
"MongoDB operations permit you to run arbitrary JavaScript expressions directly on the server: $where db.eval() mapReduce group You must exercise care in these cases to prevent users from submitting malicious JavaScript.
Fortunately, you can express most queries in MongoDB without JavaScript and for queries that require JavaScript, you can mix JavaScript and non-JavaScript in a single query."
So while it's certainly easier to avoid this kind of injection, it's certainly not bullet proof.
My point was that the default with SQL is to write your own queries whereas mongo has an abstraction layer by default.
[1]: http://www.kalzumeus.com/2010/09/22/security-lessons-learned...
[2]: http://docs.mongodb.org/manual/faq/developers/#dollar-sign-o...