From 5e8bc5c2ade7f9d42827c875b559b4dd4aa6b64e Mon Sep 17 00:00:00 2001 From: Bernhard Date: Mon, 16 Jan 2023 00:34:53 +0100 Subject: [PATCH] fix regex and remove forbidden windows characters (#2012) refactor: fix regex and remove forbidden windows characters --- worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java b/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java index ab2037ec0..2c62e08ec 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -420,7 +420,7 @@ public final class WorldEdit { } private boolean checkFilename(String filename) { - return filename.matches("^[A-Za-z0-9_\\- \\./\\\\'\\$@~!%\\^\\*\\(\\)\\[\\]\\+\\{\\},\\?]+\\.[A-Za-z0-9]+$"); + return filename.matches("^[A-Za-z0-9_\\-./'$@~!%()\\[\\]+{},]+\\.[A-Za-z0-9]+$"); } /**