mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-09-09 00:48:15 +00:00
修复 sql注入漏洞 #4393
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package org.jeecg.modules.system.security;
|
||||
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.constant.SymbolConstant;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.common.util.security.AbstractQueryBlackListHandler;
|
||||
@@ -52,7 +51,9 @@ public class DictQueryBlackListHandler extends AbstractQueryBlackListHandler {
|
||||
*/
|
||||
private String getTableName(String str) {
|
||||
String[] arr = str.split("\\s+(?i)where\\s+");
|
||||
return arr[0];
|
||||
// sys_user , (sys_user), sys_user%20, %60sys_user%60 issues/4393
|
||||
String reg = "\\s+|\\(|\\)|`";
|
||||
return arr[0].replaceAll(reg, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user