Menu

SQL Injection safety guidelines

Help
Amit
2005-12-30
2012-09-19
  • Amit

    Amit - 2005-12-30

    Hello,

    I would like to know if MySQLdb is 'SQL Injection' safe? And what are the guide lines for creating an 'SQL Injection' safe application using MySQLdb?

    Thanks,
    Amit

     
    • Andy Dustman

      Andy Dustman - 2005-12-30

      As long as you are inserting your parameters with cursor.execute() as described in PEP-249, you should be safe. If you are building your own queries from user data, or using the % operator to insert parameter values, then SQL injection is possible, depending on how your application is designed.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.