【issues/4393】解决使用参数tableName=sys_user t&复测,漏洞仍然存在

This commit is contained in:
zhangdaiscott
2023-08-14 12:51:31 +08:00
parent 0bc7e0967d
commit 751b81c7bf
2 changed files with 15 additions and 11 deletions

View File

@@ -56,6 +56,9 @@ public class DictQueryBlackListHandler extends AbstractQueryBlackListHandler {
if (tableName.contains(" ")) {
tableName = tableName.substring(0, tableName.indexOf(" "));
}
if (tableName.contains(".")) {
tableName = tableName.substring(tableName.indexOf(".")+1, tableName.length());
}
//【issues/4393】 sys_user , (sys_user), sys_user%20, %60sys_user%60
String reg = "\\s+|\\(|\\)|`";
return tableName.replaceAll(reg, "");