Skip to content
Permalink
Browse files
Merge pull request from GHSA-pc22-3g76-gm6j
 security: use java.nio.files in Generator.
  • Loading branch information
frantuma committed Mar 2, 2021
2 parents a4b766b + 3b40539 commit 987ea7a30b463cc239580d6ad166c707ae942a89
Showing with 2 additions and 3 deletions.
  1. +2 −3 modules/swagger-generator/src/main/java/io/swagger/generator/online/Generator.java
@@ -15,6 +15,7 @@
import org.slf4j.LoggerFactory;

import java.io.File;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
@@ -173,9 +174,7 @@ public static InputOption serverOptions(@SuppressWarnings("unused") String langu

protected static File getTmpFolder() {
try {
File outputFolder = File.createTempFile("codegen-", "-tmp");
outputFolder.delete();
outputFolder.mkdir();
File outputFolder = Files.createTempDirectory("codegen-").toFile();
outputFolder.deleteOnExit();
return outputFolder;
} catch (Exception e) {

0 comments on commit 987ea7a

Please sign in to comment.