Update CommonsUtils.java

This commit is contained in:
RB 2024-03-04 23:07:21 +08:00
parent 1396c8a0dc
commit fed4f1b2ad

View file

@ -306,8 +306,7 @@ public class CommonsUtils {
*/
public static void checkFilePathAttack(String filepath) throws SecurityException {
if (filepath == null) return;
if (filepath.contains(".rebuild") || filepath.contains("../")
|| filepath.contains("<") || filepath.contains(">")) {
if (filepath.contains("../") || filepath.contains("<") || filepath.contains(">")) {
throw new SecurityException("Attack path detected : " + filepath);
}
}