fix regex and remove forbidden windows characters (#2012)

refactor: fix regex and remove forbidden windows characters
This commit is contained in:
Bernhard 2023-01-16 00:34:53 +01:00 committed by GitHub
parent 0f558425f5
commit 5e8bc5c2ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,7 +420,7 @@ public final class WorldEdit {
} }
private boolean checkFilename(String filename) { 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]+$");
} }
/** /**