Skip to content

Commit

Permalink
secured zip
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Homer <[email protected]>
  • Loading branch information
etiennehomer committed Sep 27, 2024
1 parent 4670e3c commit a1c8d60
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,14 +362,14 @@ public UUID importCase(MultipartFile mpf, boolean withExpiration, boolean withIn
}

private void importZipContent(InputStream inputStream, UUID caseUuid) throws IOException {
try (ZipInputStream zipInputStream = new SecuredZipInputStream(inputStream, 1000, 100000000)) {
try (SecuredZipInputStream securedZipInputStream = new SecuredZipInputStream(inputStream, 1000, 500000000)) {
ZipEntry entry;

while ((entry = zipInputStream.getNextEntry()) != null) {
while ((entry = securedZipInputStream.getNextEntry()) != null) {
if (!entry.isDirectory()) {
processEntry(caseUuid, zipInputStream, entry);
processEntry(caseUuid, securedZipInputStream, entry);
}
zipInputStream.closeEntry();
securedZipInputStream.closeEntry();
}
}
}
Expand Down

0 comments on commit a1c8d60

Please sign in to comment.