From 4e937a6024662242171431918401466bfb108c70 Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <23113631+pixeebot@users.noreply.github.com> Date: Thu, 8 Feb 2024 02:46:39 +0000 Subject: [PATCH] Sanitized user-provided file names in HTTP multipart uploads --- .../software/SPDF/controller/api/misc/ShowJavascript.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java index 6accfb7a..e1355c30 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java @@ -68,7 +68,7 @@ public class ShowJavascript { if (script.isEmpty()) { script = - "PDF '" + inputFile.getOriginalFilename() + "' does not contain Javascript"; + "PDF '" + Filenames.toSimpleFileName(inputFile.getOriginalFilename()) + "' does not contain Javascript"; } return WebResponseUtils.bytesToWebResponse(