mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-12-24 10:17:38 +00:00
improve sanitization
This commit is contained in:
parent
1802d91fad
commit
6e79310ef8
@ -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>" +
|
||||
|
Loading…
Reference in New Issue
Block a user