Merge pull request #798 from Stirling-Tools/pixeebot/fixes
Hardening suggestions for Stirling-PDF / fixes
This commit is contained in:
commit
fd8f3ce019
2 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ public class ShowJavascript {
|
|||
|
||||
return WebResponseUtils.bytesToWebResponse(
|
||||
script.getBytes(StandardCharsets.UTF_8),
|
||||
inputFile.getOriginalFilename() + ".js");
|
||||
Filenames.toSimpleFileName(inputFile.getOriginalFilename()) + ".js");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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() + "; }");
|
||||
|
|
Loading…
Reference in a new issue