Fix FP from mkdirs call on exact temp directory

This commit is contained in:
Jonathan Leitschuh
2022-02-09 11:01:54 -05:00
parent 787e3dac31
commit 49a73673b6
3 changed files with 65 additions and 9 deletions

View File

@@ -269,4 +269,14 @@ public class Test {
tempFile.setReadable(false, false);
tempFile.setReadable(true, true);
}
void notVulnerableCreateOnSystemPropertyDir() throws IOException {
File tempDir = new File(System.getProperty("java.io.tmpdir"));
tempDir.mkdir();
}
void notVulnerableCreateOnSystemPropertyDirs() throws IOException {
File tempDir = new File(System.getProperty("java.io.tmpdir"));
tempDir.mkdirs();
}
}