diff --git a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java index ed6cf366789a55865390948001fac349f8db3093..8f162061de832319567338ed51ad2a4c5dc069d3 100644 --- a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java +++ b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java @@ -41,8 +41,8 @@ public class ZipFileExtractor { } private void verifySizeLimit(long uncompressedSize) { - if (uncompressedSize > ZIP_MAX_TOTAL_SIZE) { - throw new TechnicalException("Expect uncompressed size %s to be smaller than %d!".formatted(uncompressedSize, ZIP_MAX_TOTAL_SIZE)); + if (uncompressedSize > getZipMaxTotalSize()) { + throw new TechnicalException("Expect uncompressed size %s to be smaller than %d!".formatted(uncompressedSize, getZipMaxTotalSize())); } } @@ -55,6 +55,9 @@ public class ZipFileExtractor { } } + int getZipMaxTotalSize() { + return ZIP_MAX_TOTAL_SIZE; + } Long sumUncompressedEntrySizes(File zipFile) { return mapZipEntries(zipFile, ReadableZipEntry::getPositiveSize)