习惯性伸手党区 python 模块 Psycopg 关于预防 SQL 注入的例子

wendy1 · 2016年02月22日 · 798 次阅读

Psycopg 模块官方文档中,预防 SQL 注入有一段说明,能不能举个例子,用 “+” 怎么写会引起 SQL 注入?谢谢

Warning Never, never, NEVER use Python string concatenation (+) or string parameters interpolation (%) to pass variables to a SQL query string. Not even at gunpoint.

官方文档

暫無回覆。
需要 登录 後方可回應,如果你還沒有帳號按這裡 注册