Skip to content

Auto-port 5.0: Pass maxAllocation to Brotli and Zstd decoders#16887

Merged
chrisvest merged 1 commit into
5.0from
auto-port-pr-16844-to-5.0
Jun 4, 2026
Merged

Auto-port 5.0: Pass maxAllocation to Brotli and Zstd decoders#16887
chrisvest merged 1 commit into
5.0from
auto-port-pr-16844-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16844 to 5.0
Cherry-picked commit: 5a52600


Motivation:
Brotli and Zstd should using the same maxAllocation limits as gzip and zlib, if these limits are defined. This leads to unification of usage and as a prtoection against zip bombs even on memory-strained environments, as well as allowing larger archives on explicitly configured envirironments.

Modifications:
Field maxAllocation of class HttpContentDecompressor is now passed to constructors of BrotliDecoder and ZstdDecoder classes.

Result:
If user configures max allocation for decryption, then the same allocation will be used for decryption of zstd and Brotli loads

Motivation:
Brotli and Zstd should using the same maxAllocation limits as gzip and
zlib, if these limits are defined. This leads to unification of usage
and as a prtoection against zip bombs even on memory-strained
environments, as well as allowing larger archives on explicitly
configured envirironments.

Modifications:
Field maxAllocation of class HttpContentDecompressor is now passed to
constructors of BrotliDecoder and ZstdDecoder classes.

Result:
If user configures max allocation for decryption, then the same
allocation will be used for decryption of zstd and Brotli loads

(cherry picked from commit 5a52600)
@chrisvest chrisvest added this to the 5.0.0.Final milestone Jun 2, 2026
@chrisvest chrisvest merged commit 5a9e143 into 5.0 Jun 4, 2026
15 of 23 checks passed
@chrisvest chrisvest deleted the auto-port-pr-16844-to-5.0 branch June 4, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants