mysql注入预防_mysql – SQL注入预防

我目前正在开发一个传统的ASP项目,其中安全性现在已成为一个大问题.它不仅是不安全的加密方法(md5),而且我担心SQL注入问题.我对注射效果还不是很好,而且我只尝试过我所知道的基础知识.我发现了“保护”任何用户输入的功能,但我想知道它是否真的做了什么来防止注入攻击.这是功能:

function sqlfix(input)

if not isnull(input) and input <> "" then

input = replace(input, ";", ";")

input = replace(input, "'", "'")

input = replace(input, """", """)

input = replace(input, "(", "(")

input = replace(input, ")", ")")

input = replace(input, "|", "|")

input = replace(input, "

input = replace(input, ">", ">")

input = replace(input , "'", "''")

'input = Server.HTMLEncode(input)

'input = Server.UrlEncode(input)

sqlfix = input

else

sqlfix = ""

end if

end function

我记得在很多年前我第一次使用mysql_ *函数启动PHP时做了类似的事情,但现在我已经转向了PDO和参数绑定.但是我不知道这对ASP应用程序有多安全.感谢您的任何意见.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值