jmestwa-coder opened a new pull request, #1057: URL: https://github.com/apache/poi/pull/1057
## Summary Apply existing zip-bomb protections to the encrypted temp ZIP processing path used by `AesZipFileZipEntrySource`. Previously, this flow re-streamed attacker-controlled ZIP entries through `ZipArchiveInputStream` without `ZipArchiveThresholdInputStream` enforcement, allowing highly compressed entries to bypass configured inflate-ratio checks during temporary encrypted ZIP creation. This change aligns the encrypted processing path with the existing ZIP security protections already used elsewhere in POI. ## Changes * wrap encrypted temp ZIP input streams with `ZipArchiveThresholdInputStream` * enforce configured inflate-ratio and entry-threshold checks during temp ZIP creation * expose `getNextEntry()` on `ZipArchiveThresholdInputStream` for internal stream-based processing usage * add regression coverage for highly compressed ZIP input ## Regression Test Added `rejectsZipBombInput()` to verify: * before this patch: highly compressed input was processed successfully * after this patch: inflate-ratio enforcement correctly rejects the input with a zip-bomb exception The test restores modified `ZipSecureFile` settings in a `finally` block to avoid leaking state across tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
