I am very new to node.js and mongodb. I have a page getting query strings with
var queries = url.parse(req.url,true).query;
and I write them into database using mongoskin module. Do I have to do something against sql injection?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://docs.mongodb.org/manual/faq/developers/#how-does-mongodb-address-sql-or-query-injection
You don’t need to worry about traditional SQL Injection in MongoDB or any kind of query injection with the code you have above. Only these commands:
will allow execution of JavaScript and would be unsafe if using user-provided data.