首页 > 数据库技术 > 详细

防止SQL注入的办法

时间:2020-04-25 12:08:54      阅读:40      评论:0      收藏:0      [点我收藏+]

原始SQL语句:select count(*) from tbusers where username=‘abc‘ and userpass=‘abc‘
注入后的SQL:select count(*) from tbusers where username=‘abc‘ or 1=1 -- and userpass=‘abc‘

注入SQL后,会绕过注册验证,所以建议使用带参数的sql或者存储过程.

防止SQL注入的办法

原文:https://www.cnblogs.com/boentouch/p/12772188.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!