Repository navigation
fix(filter): keep multipart form parsing with body scanning on, add guard.enabled - #39
Merged
Merged
Conversation
…body scanning on (#37) The guard reads the body for detection, but the container parses parts and parameters from its own input and never saw the replay. Multipart is now scanned from the container-parsed parts and urlencoded body parameters are merged from the cache.
…38) Defaults to true. With false no guard bean, filter or properties binding is created.
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.
Closes #37
Closes #38
I fixed multipart uploads losing their parts when detection body scanning is on. The container parses parts and urlencoded parameters from its own input, so the guard now scans a body rebuilt from the container-parsed parts (bounded by the inspect cap, file parts stay in the container spool) and merges urlencoded body parameters from its cache. The same cause made @RequestParam on urlencoded forms come back empty.
I also added guard.enabled (default true) so an app can switch the whole auto-configuration off. I added tests for both, README and installation docs, and a CHANGELOG entry under Unreleased.