【fix】处理csrf的bug

This commit is contained in:
zer0Black
2023-05-30 16:34:17 +08:00
parent 747a0b5f52
commit 9f12748260
5 changed files with 6 additions and 6 deletions
@@ -78,7 +78,7 @@ public class CsrfFilter implements Filter {
private boolean isWhiteReq(String referUrl) { private boolean isWhiteReq(String referUrl) {
try { try {
if (referUrl == null || "".equals(referUrl) || size == 0) { if (referUrl == null || "".equals(referUrl) || size == 0) {
return false; return true;
} else { } else {
String refHost = ""; String refHost = "";
referUrl = referUrl.toLowerCase(); referUrl = referUrl.toLowerCase();
@@ -36,7 +36,7 @@ public class JeroSystemSingleApplication extends SpringBootServletInitializer {
"Application jero-boot is running! Access URLs:\n\t" + "Application jero-boot is running! Access URLs:\n\t" +
"Local: \t\thttp://localhost:" + port + path + "\n\t" + "Local: \t\thttp://localhost:" + port + path + "\n\t" +
"External: \thttp://" + ip + ":" + port + path + "\n\t" + "External: \thttp://" + ip + ":" + port + path + "\n\t" +
"Swagger文档: \thttp://" + ip + ":" + port + path + "doc.html\n" + "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
"----------------------------------------------------------"); "----------------------------------------------------------");
} }
@@ -272,13 +272,13 @@ jero:
# 文件限制后缀黑名单 # 文件限制后缀黑名单
fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin
# 跨站白名单 # 跨站白名单
whiteUrls: localhost:3000 whiteUrls: localhost:3000,localhost:8080
# xss白名单 # xss白名单
xssExcludedPages: /login,/updatePassword xssExcludedPages: /login,/updatePassword
# cors白名单 # cors白名单
notFilter: notFilter:
# origin地址 # origin地址
originIp: http://localhost:3000 originIp: http://localhost:3000,
# 加密默认值 # 加密默认值
password: password:
pbe: pbe:
@@ -273,7 +273,7 @@ jero:
# 文件限制后缀黑名单 # 文件限制后缀黑名单
fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin
# 跨站白名单 # 跨站白名单
whiteUrls: whiteUrls: localhost:3000,localhost:8080
# xss白名单 # xss白名单
xssExcludedPages: /login,/updatePassword xssExcludedPages: /login,/updatePassword
# cors白名单 # cors白名单
@@ -272,7 +272,7 @@ jero:
# 文件限制后缀黑名单 # 文件限制后缀黑名单
fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin
# 跨站白名单 # 跨站白名单
whiteUrls: localhost:3000 whiteUrls: localhost:3000,localhost:8080
# xss白名单 # xss白名单
xssExcludedPages: /login,/updatePassword xssExcludedPages: /login,/updatePassword
# cors白名单 # cors白名单