diff --git a/main/tests/server/src/com/google/refine/tests/importing/ImportingUtilitiesTests.java b/main/tests/server/src/com/google/refine/tests/importing/ImportingUtilitiesTests.java index b577d3aa4..de30f8310 100644 --- a/main/tests/server/src/com/google/refine/tests/importing/ImportingUtilitiesTests.java +++ b/main/tests/server/src/com/google/refine/tests/importing/ImportingUtilitiesTests.java @@ -1,6 +1,8 @@ package com.google.refine.tests.importing; +import java.io.File; +import java.io.IOException; import java.util.LinkedList; import org.testng.Assert; @@ -14,6 +16,7 @@ import com.google.refine.importers.tree.TreeImportingParserBase; import com.google.refine.importing.ImportingJob; import com.google.refine.importing.ImportingUtilities; import com.google.refine.tests.importers.ImporterTest; +import com.google.refine.tests.util.TestUtils; import com.google.refine.util.JSONUtilities; import com.google.refine.util.ParsingUtilities; @@ -37,9 +40,10 @@ public class ImportingUtilitiesTests extends ImporterTest { } @Test(expectedExceptions=IllegalArgumentException.class) - public void testZipSlip() { + public void testZipSlip() throws IOException { + File tempDir = TestUtils.createTempDirectory("openrefine-zip-slip-test"); // For CVE-2018-19859, issue #1840 - ImportingUtilities.allocateFile(workspaceDir, "../../script.sh"); + ImportingUtilities.allocateFile(tempDir, "../../tmp/script.sh"); } private ObjectNode getNestedOptions(ImportingJob job, TreeImportingParserBase parser) {