1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-06-28 13:44:33 +02:00

Merge pull request #798 from Stirling-Tools/pixeebot/fixes

Hardening suggestions for Stirling-PDF / fixes
This commit is contained in:
Anthony Stirling 2024-02-10 00:33:33 +00:00 committed by GitHub
commit fd8f3ce019
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ public class ShowJavascript {
return WebResponseUtils.bytesToWebResponse(
script.getBytes(StandardCharsets.UTF_8),
inputFile.getOriginalFilename() + ".js");
Filenames.toSimpleFileName(inputFile.getOriginalFilename()) + ".js");
}
}
}

View File

@ -54,7 +54,7 @@ public class FileToPdf {
if (request.getZoom() != 1.0) {
// Create a temporary CSS file
File tempCssFile = File.createTempFile("customStyle", ".css");
File tempCssFile = Files.createTempFile("customStyle", ".css").toFile();
try (FileWriter writer = new FileWriter(tempCssFile)) {
// Write the CSS rule to the file
writer.write("body { zoom: " + request.getZoom() + "; }");