We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09315b9 commit 2b42519Copy full SHA for 2b42519
modules/common/app/utils/common/ZipUtil.java
@@ -34,6 +34,7 @@ public class ZipUtil {
34
* zip's content in there. The method can handle recursive unzipping of sub-directories.
35
*/
36
public static File unzip(File fileToUnzip, File destDir) throws IOException {
37
+ destDir = destDir.toPath().normalize().toFile(); // normalize to prevent path traversal attacks
38
FileUtils.deleteQuietly(destDir);
39
IOUtils.createDir(destDir);
40
destDir.deleteOnExit();
0 commit comments