Skip to content

Commit

Permalink
Fixed file upload tmp directory creation when root directory is not w…
Browse files Browse the repository at this point in the history
…rittable by application #449. (#453)
  • Loading branch information
tkomlodi authored Dec 3, 2023
1 parent f0fa69c commit b1fad11
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ public UnrestrictedFileUpload() throws IOException, URISyntaxException {
"If you are running vulnerableApp as a Jar then UnrestrictedFileUpload will not work. "
+ "For more information: https://github.com/SasanLabs/VulnerableApp/issues/255",
e);
if (root != null) {
if (root == null || !root.toFile().exists()) {
root = Files.createTempDirectory(null);
}
if (contentDispositionRoot != null) {
if (contentDispositionRoot == null || !contentDispositionRoot.toFile().exists()) {
contentDispositionRoot = Files.createTempDirectory(null);
}
}
Expand Down

0 comments on commit b1fad11

Please sign in to comment.