sql注入

数据库开发时,sql语句要过滤或者用半角代替某些符号防止sql注入

select * from users where username=request["username"] and password=request["password"]
 
当request["username"] = 'q' or 0=0 --
这样就可以得到用户表
 
--为注释 or 0=0永远是真
 
也可以用封装好的类来执行sql
原文地址:https://www.cnblogs.com/cplover/p/3372212.html