PDA

View Full Version : Python input sterilization



bobman321123
June 26th, 2012, 11:11 PM
Does anyone have any advice/links on how to sterilize Python input?

greenpeace
June 27th, 2012, 08:44 AM
hey bob,

Depends... what are you going to do with the input?

For interaction with a database, make sure you use a parameterized query and the execute() method..

Here's an example:

http://stackoverflow.com/questions/5395290/sql-injection-prevention-in-python-is-using-parameterized-query-enough