Skip to content

Commit

Permalink
Fix - Add fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
David Fadida committed Sep 10, 2023
1 parent 1b2cd81 commit 3ac9b11
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ object FileUtil {
if (entry.isDirectory) {
Files.createDirectories(filePath)
} else {
val destCanonical = dest.getCanonicalPath()
if (!filePath.getCanonicalPath().startsWith(destCanonical + File.separator)) {
throw new Exception("Entry is outside of the target dir: " + entry.getName)
}
Using(Files.newOutputStream(filePath)) {
out => writeData(in, out)
}
Expand Down

0 comments on commit 3ac9b11

Please sign in to comment.