Statement安全漏洞(sql注入问题)问题展示: 首先我的Mysql数据库中有一张users表,如下图所示 /** * 根据用户名查询用户 * @param username 需要查询的用户名 * @return User 记录对应的JavaBean对象 */ public static User find(String name){ Connection conn = null; Statement sta = null; ResultSet re = null; User user =
SQL注入(SQL Injection) 所谓SQL注入式攻击,就是攻击者把SQL命令插入到Web表单的输入域或页面请求的查询字符串,欺骗服务器执行恶意的SQL命令.攻击者通过web请求提交带有影响正常SQL执行的参数(arlen’ OR ‘1’=’1),服务端在执行SQL时参数的特殊性影响了原本的意思(select * from table where user=’arlen\’ OR \’1\’=\’1’;),执行了非预期的操作(select * from table where user=