Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,10 @@ public static void unzipFunction(String destinationFolder, String zipFile) {
Boolean print = true;
while (entry != null) {
String entryName = entry.getName();
File file = new File(destinationFolder + File.separator + entryName);
File file = new File(destinationFolder, entryName);
if (!file.toPath().normalize().startsWith(destinationFolder)) {
throw new IOException("Bad zip entry");
}

// only print first entry, the zip-file itself
if (print) {
Expand Down