Disallow worldname to have . or /

This commit is contained in:
Ben Woo 2021-05-16 21:13:16 +08:00
parent 0e9fe0c3ec
commit a14b822de8

View File

@ -18,7 +18,7 @@ import java.util.regex.Pattern;
*/
public class WorldNameChecker {
private static final Pattern WORLD_NAME_PATTERN = Pattern.compile("[a-zA-Z0-9/._-]+");
private static final Pattern WORLD_NAME_PATTERN = Pattern.compile("[a-zA-Z0-9_-]+");
private static final Set<String> BLACKLIST_NAMES = Collections.unmodifiableSet(new HashSet<String>() {{
add("plugins");
add("logs");