diff --git a/src/me/StevenLawson/TotalFreedomMod/HTTPD/Module_schematic.java b/src/me/StevenLawson/TotalFreedomMod/HTTPD/Module_schematic.java index be9da60e..b67d984b 100644 --- a/src/me/StevenLawson/TotalFreedomMod/HTTPD/Module_schematic.java +++ b/src/me/StevenLawson/TotalFreedomMod/HTTPD/Module_schematic.java @@ -23,14 +23,14 @@ public class Module_schematic extends TFM_HTTPD_Module { private static final File SCHEMATIC_FOLDER = new File("./plugins/WorldEdit/schematics/"); private static final String REQUEST_FORM_FILE_ELEMENT_NAME = "schematicFile"; - private static final Pattern SCHEMATIC_FILENAME_LC = Pattern.compile("^[a-z0-9]{5,30}\\.schematic$"); + private static final Pattern SCHEMATIC_FILENAME_LC = Pattern.compile("^[a-z0-9]{1,30}\\.schematic$"); private static final String[] SCHEMATIC_FILTER = new String[] { "schematic" }; private static final String UPLOAD_FORM = "
\n" - + "

Select a schematic file to upload. Filenames must be alphanumeric, between 5 and 30 characters long (inclusive), and have a .schematic extension.

\n" + + "

Select a schematic file to upload. Filenames must be alphanumeric, between 1 and 30 characters long (inclusive), and have a .schematic extension.

\n" + "\n" + "
\n" + "\n" @@ -178,7 +178,7 @@ public class Module_schematic extends TFM_HTTPD_Module if (!SCHEMATIC_FILENAME_LC.matcher(origFileName.toLowerCase()).find()) { - throw new SchematicTransferException("File name must be alphanumeric with a \".schematic\" extension."); + throw new SchematicTransferException("File name must be alphanumeric, between 1 and 30 characters long (inclusive), and have a \".schematic\" extension."); } final File targetFile = new File(SCHEMATIC_FOLDER.getPath(), origFileName);