Skip to content

Commit

Permalink
Merge pull request #8 from JLLeitschuh/fix/JLL/temporary_directory_hi…
Browse files Browse the repository at this point in the history
…jacking_or_temporary_directory_information_disclosure

[SECURITY] Fix Temporary Directory Hijacking or Information Disclosure Vulnerability

The vulnerable code was only in tests. No users were affected. Merging for correctness.
  • Loading branch information
JayDVector committed Aug 8, 2022
2 parents 0b4f1e6 + b6ceb60 commit 4f5b7c4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import junit.framework.Assert;

import java.io.File;
import java.nio.file.Files;

/**
*
Expand All @@ -16,9 +17,7 @@ public class VectorCASTPublisherTest extends AbstractVectorCASTTestBase {
public void testLocateReports() throws Exception {

// Create a temporary workspace in the system
File w = File.createTempFile("workspace", ".test");
w.delete();
w.mkdir();
File w = Files.createTempDirectory("workspace" + ".test").toFile();
w.deleteOnExit();
FilePath workspace = new FilePath(w);

Expand Down Expand Up @@ -63,4 +62,4 @@ public void testLocateReports() throws Exception {

}

}
}

0 comments on commit 4f5b7c4

Please sign in to comment.