diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/CommonUtils.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/CommonUtils.java index a5ae9346..62c7f5d5 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/CommonUtils.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/CommonUtils.java @@ -253,7 +253,8 @@ public class CommonUtils { */ public static boolean limitFileSuffix(String fileName,String[] fileSuffixLimits){ final List fileNameList = Arrays.asList(fileSuffixLimits); - return fileNameList.stream().anyMatch(name -> fileName.substring(0,fileName.lastIndexOf('.')).contains(name)||fileName.substring(fileName.lastIndexOf('.')).equals(name)); + boolean isExists = fileNameList.stream().anyMatch(name -> fileName.substring(0,fileName.lastIndexOf('.')).contains(name)||fileName.substring(fileName.lastIndexOf('.')).contains(name)); + return isExists; } /** * RSA 使用私钥解密 diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml b/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml index b612269d..da2cc9d6 100644 --- a/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml +++ b/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml @@ -270,7 +270,7 @@ jero: type: STANDALONE enabled: true # 文件限制后缀黑名单 - 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,$DATA # 跨站白名单 whiteUrls: localhost:3000,localhost:8080 # xss白名单 diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/application-prod.yml b/jero-boot/jero-boot-single-startup/src/main/resources/application-prod.yml index e2bd1ee7..3a3b9ab7 100644 --- a/jero-boot/jero-boot-single-startup/src/main/resources/application-prod.yml +++ b/jero-boot/jero-boot-single-startup/src/main/resources/application-prod.yml @@ -271,7 +271,7 @@ jero: type: STANDALONE enabled: true # 文件限制后缀黑名单 - 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,$DATA # 跨站白名单 whiteUrls: localhost:3000,localhost:8080 # xss白名单 diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/application-test.yml b/jero-boot/jero-boot-single-startup/src/main/resources/application-test.yml index ed320023..f543d166 100644 --- a/jero-boot/jero-boot-single-startup/src/main/resources/application-test.yml +++ b/jero-boot/jero-boot-single-startup/src/main/resources/application-test.yml @@ -270,7 +270,7 @@ jero: type: STANDALONE enabled: true # 文件限制后缀黑名单 - 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,$DATA # 跨站白名单 whiteUrls: localhost:3000,localhost:8080 # xss白名单