Skip to content

Pass maxAllocation to Brotli and Zstd decoders (#16844)#16886

Merged
normanmaurer merged 1 commit into
netty:4.1from
chrisvest:4.1-enc-limit
Jun 2, 2026
Merged

Pass maxAllocation to Brotli and Zstd decoders (#16844)#16886
normanmaurer merged 1 commit into
netty:4.1from
chrisvest:4.1-enc-limit

Conversation

@chrisvest

Copy link
Copy Markdown
Member

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)

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 4.1.135.Final milestone Jun 1, 2026
@normanmaurer normanmaurer merged commit 51260aa into netty:4.1 Jun 2, 2026
18 checks passed
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