From 6e79310ef8337d676bbbd23988857cdb8cf1490c Mon Sep 17 00:00:00 2001 From: ayunami2000 Date: Sun, 17 Apr 2022 20:23:23 -0400 Subject: [PATCH] improve sanitization --- .../java/dev/plex/request/impl/SchematicDownloadEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/plex/request/impl/SchematicDownloadEndpoint.java b/src/main/java/dev/plex/request/impl/SchematicDownloadEndpoint.java index e293f1f..b5d0d0b 100644 --- a/src/main/java/dev/plex/request/impl/SchematicDownloadEndpoint.java +++ b/src/main/java/dev/plex/request/impl/SchematicDownloadEndpoint.java @@ -95,7 +95,7 @@ public class SchematicDownloadEndpoint extends AbstractServlet Arrays.sort(alphabetical); for (File worldeditFile : alphabetical) { - String sanitizedName = worldeditFile.getName().replaceAll("<[^>]*>", ""); + String sanitizedName = worldeditFile.getName().replaceAll("<","<").replaceAll(">",">"); sb.append("" + "" + sanitizedName + "" + "" + formattedSize(worldeditFile.length()) + "" +