开发者

SQL injections with noSQL databases?

I am using mongoDB currently, and I am wondering what measures we should take to ensure that any data that could cause problems isn't stored. I believe that 开发者_JAVA百科normal PHP functions like mysql_escape_string isn't going to help here...

Is there SQL injections for noSQL databases and especially mongoDB?

If so, what can we do to protect us from them?


See MongoDB's documentation:

Generally, with MongoDB we are not building queries from strings, so traditional SQL Injection attacks are not a problem.

There are other issues to be aware of, so it's worth giving that page a read.


The documentation is wrong, In PHP you need to be careful of null-byte injection attacks (http://www.idontplaydarts.com/2011/02/mongodb-null-byte-injection-attacks/) as well as object injection (http://www.idontplaydarts.com/2010/07/mongodb-is-vulnerable-to-sql-injection-in-php-at-least/)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜