mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-22 12:48:58 +08:00
update SqlFilterArgumentResolver.java.
This commit is contained in:
parent
70b6e08e41
commit
fbfae70d41
@ -102,14 +102,7 @@ public class SqlFilterArgumentResolver implements HandlerMethodArgumentResolver
|
||||
* @return Predicate
|
||||
*/
|
||||
private Predicate<String> sqlInjectPredicate() {
|
||||
return sql -> {
|
||||
for (String keyword : KEYWORDS) {
|
||||
if (StrUtil.containsIgnoreCase(sql, keyword)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
return sql -> Arrays.stream(KEYWORDS).noneMatch(keyword -> StrUtil.containsIgnoreCase(sql, keyword));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user