首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

Ibatis 解决SQL 注入有关问题

2012-09-09 
Ibatis 解决SQL 注入问题常见容易犯错的写法:title like %$title$% 这样会引起SQL注入漏洞.解决方法:tit

Ibatis 解决SQL 注入问题
常见容易犯错的写法:

title like '%$title$%'


这样会引起SQL注入漏洞.

解决方法:

title like '%'||#title#||'%'

注意:以上写法在oracle使用。

在mysql中,用这个: title CONCAT('%',#title#,'%')
在mssql中,用这个: '%'+#name #+'%  

热点排行