Hacker News new | past | comments | ask | show | jobs | submit login

If you're building queries in ANY language by concatenating strings you're doing it wrong.

In a sane language that query might look something like

cursor.execute("select field from tbl where long_obtuse_column_name=:foo and status != :status", foo=query, status='open')

All parameters are properly escaped by the api of course, so even if foo is "'; drop table audit; " you don't have any problems.




I've said similar because of this, so your comment is included in my statement.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: