public class SqlInject extends Object
| 构造器和说明 |
|---|
SqlInject() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
assertNoInject(String propertyName,
String propertyValue)
预先判断字段 propertyName的值 propertyValue 不包含sql注入字符
|
static String |
assertSimpleNoInject(String propertyName,
String propertyValue)
简单判断 propertyName的值 propertyValue 不包含sql危险注入字符
";", "--", "*", "%", "\\", "'", "#", "/"
|
static boolean |
hasSimpleInject(String str)
简单判断是否可能存在SQL注入危险
不允许可能产生注入的字符串
|
static boolean |
probablySqlInject(String str)
是否含有sql注入,返回true表示含有
|
public static String assertNoInject(String propertyName, String propertyValue)
propertyName - 属性名称propertyValue - 具体属性值public static boolean probablySqlInject(String str)
str - sqlpublic static boolean hasSimpleInject(String str)
str - sqlCopyright © 2021. All rights reserved.