mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-12-22 16:04:59 +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);
|
Arrays.sort(alphabetical);
|
||||||
for (File worldeditFile : alphabetical)
|
for (File worldeditFile : alphabetical)
|
||||||
{
|
{
|
||||||
String sanitizedName = worldeditFile.getName().replaceAll("<[^>]*>", "");
|
String sanitizedName = worldeditFile.getName().replaceAll("<","<").replaceAll(">",">");
|
||||||
sb.append("<tr>" +
|
sb.append("<tr>" +
|
||||||
"<th scope=\"row\"><a href=\"" + worldeditFile.getName() + "\" download>" + sanitizedName + "</a></th>" +
|
"<th scope=\"row\"><a href=\"" + worldeditFile.getName() + "\" download>" + sanitizedName + "</a></th>" +
|
||||||
"<td>" + formattedSize(worldeditFile.length()) + "</td>" +
|
"<td>" + formattedSize(worldeditFile.length()) + "</td>" +
|
||||||
|
|
Loading…
Reference in a new issue