Preventing SQL Injection Attacks 预防SQL注入式攻击

  1. Never trust user input(不要信任用户输入) Validate all textbox entries using validation controls, regular expressions, code, and so on (用验证控件验证所有的输入框,正则表达式,编码等)
  2. Never use dynamic SQL(不要使用动态sql) Use parameterized SQL or stored procedures(应该用参数化sql或存储过程)
  3. Never connect to a database using an admin-level account(不要用管理级账号连接数据库) Use a limited access account to connect to the database (用限制级账号连接数据库)
  4. Don't store secrets in plain text (不要保存秘密信息在纯文本中)Encrypt or hash passwords and other sensitive data; you should also encrypt connection strings (应该加密或搞乱密码和其它敏感数据,也应该加密连接字符串)
  5. Exceptions should divulge minimal information(异常应该泄漏最少信息) Don't reveal too much information in error messages; use customErrors to display minimal information in the event of unhandled error; set debug to false(不要在出错消息中暴露太多信息,如果发生未错误处理应该用自定义错误信息显示最少信息,设置调试为false)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值