fix: 完善sql注入拦截器

This commit is contained in:
fit2cloud-chenyw 2021-08-31 15:26:49 +08:00
parent 9f51920c55
commit 6b1f54808b
4 changed files with 4 additions and 4 deletions

View File

@ -235,7 +235,7 @@ public class XssAndSqlHttpServletRequestWrapper extends HttpServletRequestWrappe
if (Arrays.stream(whiteLists.split(",")).anyMatch(item -> url.indexOf(item) != -1)) return false;
}
Pattern pattern= Pattern.compile("(.*\\=.*\\-\\-.*)|(.*(\\+).*)|(.*\\w+(%|\\$|#|&)\\w+.*)|(.*\\|\\|.*)|(.*\\s+(and|or)\\s+.*)" +
"|(.*\\b(select|update|union|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute)\\b.*)");
"|(.*\\b(select|update|union|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute|sleep|extractvalue|updatexml|substring|database|concat|rand)\\b.*)");
Matcher matcher=pattern.matcher(orders.toLowerCase());
return matcher.find();
}

View File

@ -542,7 +542,7 @@ export default {
create: 'Create',
modify: 'Modify',
delete: 'Delete',
delete_confirm: 'Deleting the organization will be associated with deleting the subordinate organization, Are you sure you want to delete it?',
delete_confirm: 'Are you sure you want to delete the organization?',
input_name: 'Please enter name',
select_organization: 'Please select organization',
search_by_name: 'Search by name',

View File

@ -542,7 +542,7 @@ export default {
create: '新建組織',
modify: '修改組織',
delete: '刪除組織',
delete_confirm: '刪除該組織會關聯刪除該組織的下屬組織,確定要刪除嗎?',
delete_confirm: '確定要刪除該組織嗎?',
input_name: '請輸入組織名稱',
select_organization: '請選擇組織',
search_by_name: '根據名稱搜索',

View File

@ -542,7 +542,7 @@ export default {
create: '新建组织',
modify: '修改组织',
delete: '删除组织',
delete_confirm: '删除该组织会关联删除该组织的下属组织,确定要删除吗?',
delete_confirm: '确定要删除该组织吗?',
input_name: '请输入组织名称',
select_organization: '请选择组织',
search_by_name: '根据名称搜索',