【fix】处理csrf的bug
This commit is contained in:
+1
-1
@@ -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();
|
||||||
|
|||||||
+1
-1
@@ -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白名单
|
||||||
|
|||||||
Reference in New Issue
Block a user