Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

[SECURITY] Fix Temporary Directory Hijacking or Information Disclosure Vulnerability #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -92,10 +93,8 @@ public void testFileSystemImport() throws IOException {
Properties p = new Properties();
p.setProperty("key", "value");

tempfile = File.createTempFile("messagesourcetext", null);
tempfile = Files.createTempDirectory("messagesourcetext").toFile();
if (tempfile.exists()) {
tempfile.delete();
tempfile.mkdir();
}

file = new File(tempfile, basename + ".properties");
Expand Down