开发者

SQL injection hacks and django

开发者 https://www.devze.com 2023-01-09 04:46 出处:网络
Coming from a jsp and servlet backgr开发者_C百科ound I am interested to know how django copes with SQL injection hacks. As a servlet and jsp developer I would use prepared statements which gives me so

Coming from a jsp and servlet backgr开发者_C百科ound I am interested to know how django copes with SQL injection hacks. As a servlet and jsp developer I would use prepared statements which gives me some form of protection. How does django cope with custom queries, for example a custom search field.


If you use querysets, django will escape your variables automatically. If you use RAW queries or things like the .extra method you'll have to take extra care and for example use parameter binding. More information about the whole thing can be found here (also very good resource about other security concerns).

0

精彩评论

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

关注公众号