页面导航: 首页网络编程ASP编程应用技巧 → 正文内容 asp防范跨站点脚本攻击的的方法

asp防范跨站点脚本攻击的的方法

发布:dxy 字体:[增加 减小] 类型:转载
防范跨站点脚本攻击的的方法
1.利用 空格 替换特殊字符 % < > { } ; & + - " ' ( )
2.使用@,具体而言是将以下语句
exec="insert into user(username,psw,sex,department,phone,email,demo) values('"&username&"','"&psw&"','"&sex&"','"&department&"','"&phone&"','"&email&"','"&@demo&"')"
conn.execute exec
替换成:
exec="insert into user(username,psw,sex,department,phone,email,demo) values('@username','@psw','@sex','@department','@phone','@email','@demo')"
conn.execute exec 
浏览次数:载入中... 打印本文关闭本文返回首页

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行