[SECURITY-3058]

This commit is contained in:
Kevin-CB authored and Jenkins CERT CI committed 2023-02-23 07:59:19 +00:00
1 parent d034626fd5
commit 554587b06d
1 file changed
+2 -1
@@ -31,6 +31,7 @@ import hudson.Extension;
import hudson.cli.CLICommand;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Objects;
import javax.servlet.ServletException;
import net.sf.json.JSONObject;
@@ -118,7 +119,7 @@ public class FileParameterDefinition extends ParameterDefinition {
@Override
public ParameterValue createValue(CLICommand command, String value) throws IOException, InterruptedException {
// capture the file to the server
File local = File.createTempFile("jenkins", "parameter");
File local = Files.createTempFile("jenkins", "parameter").toFile();
String name;
if (value.isEmpty()) {
FileUtils.copyInputStreamToFile(command.stdin, local);