fix: Add ConditionalOnDefaultReactiveWebSecurity - #50785
Open
michael-wirth wants to merge 1 commit into
Open
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Zir0-93
added a commit
to hadi-technology/striff-browser-extension
that referenced
this pull request
Aug 23, 2026
…11) spring-projects/spring-boot#50785 failed in the extension with Failed downloading base zip: Failed reading repository zip: Maximum call stack size exceeded which reads like a corrupt archive and was reported as a size problem. It is neither. The same archive filters correctly through the buffered path to 12.82MiB of source and documentation, comfortably inside the 15MiB upload ceiling. The whole failure is in how the bytes are handed to fflate. fflate's Unzip recurses once per entry it finishes inside a single push(), so recursion depth follows how many entries one chunk happens to contain. Measured on that archive (18MiB, 21,146 entries): 4MiB push -> Maximum call stack size exceeded at entry ~3,212 2MiB push -> ok, worst push completes 3,115 entries 1MiB push -> ok, worst push completes 2,054 entries 256KiB push -> ok, worst push completes 742 entries So the ceiling is around 3,200 frames, and which side of it a chunk lands on is a property of the archive, not of the request. A network body normally arrives in small pieces, which is why this went unseen; a fast or cached response coalesces them. filterZipStream now slices every chunk to 64KiB before pushing, whatever the reader hands over. 64KiB rather than the 1MiB that merely passed here, because bytes are a proxy for entries and the ratio belongs to the repository: a minimal local header plus a short name is about 60 bytes, so a pathological tree of tiny files puts roughly 1,100 entries in 64KiB against the ~3,200 that breaks. The cost is more push() calls over the same bytes, which is not where the time goes. The regression test builds 6,000 tiny entries and delivers them in ONE chunk. Its first version used streamOf's 4096-byte default, passed with the fix reverted, and proved nothing; it is now pinned both ways -- fails without the slicing, passes with it. Claude-Session: https://claude.ai/code/session_017X3m5Qxtn8KZPM6TqrknGk Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #50778