mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2025-07-01 16:06:42 +00:00
improve sanitization
This commit is contained in:
@ -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("<tr>" +
|
||||
"<th scope=\"row\"><a href=\"" + worldeditFile.getName() + "\" download>" + sanitizedName + "</a></th>" +
|
||||
"<td>" + formattedSize(worldeditFile.length()) + "</td>" +
|
||||
|
Reference in New Issue
Block a user