首页 新闻 会员 周边

SQL Injection

0
[待解决问题]

最近有个项目是关于web 安全性测试,使用安全扫描工具,报出下面代码(line 51)有sql injection问题,需要修复,但是我现在无从下手,不知道如何修复,哪位高人能指导下吗?

 

使用的spring jdbc, 继承的是NamedParameterJdbcTemplate

代码如下:

@Override
public CloseableSqlRowSet queryForRowSet(String sql, SqlParameterSource paramSource) throws DataAccessException {
try {
conn = getJdbcTemplate().getDataSource().getConnection();
psc = getPreparedStatementCreator(sql, paramSource);
ps = psc.createPreparedStatement(conn);
applyStatementSettings(ps);
resultSet = ps.executeQuery();  //line 51
return new CloseableResultSetWrappingSqlRowSet(resultSet, this);
} catch (SQLException ex) {
this.release();
throw translateSqlException(sql, ex);
} catch (Exception e) {
this.release();
throw e;
}
}
灵风_滴水穿石的主页 灵风_滴水穿石 | 菜鸟二级 | 园豆:204
提问于:2016-10-12 09:53
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册