mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-12-22 07:55:01 +00:00
improve sanitization
This commit is contained in:
parent
1802d91fad
commit
6e79310ef8
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue