From fbfae70d419edeef87b643b056dacd6635f2aacd Mon Sep 17 00:00:00 2001 From: Hacker <721806280@qq.com> Date: Tue, 15 Feb 2022 07:11:01 +0000 Subject: [PATCH] update SqlFilterArgumentResolver.java. --- .../mybatis/resolver/SqlFilterArgumentResolver.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/resolver/SqlFilterArgumentResolver.java b/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/resolver/SqlFilterArgumentResolver.java index 9eade954..a6824a45 100644 --- a/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/resolver/SqlFilterArgumentResolver.java +++ b/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/resolver/SqlFilterArgumentResolver.java @@ -102,14 +102,7 @@ public class SqlFilterArgumentResolver implements HandlerMethodArgumentResolver * @return Predicate */ private Predicate 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)); } }