WW-4858 Honor parameter filtering during JSON population#1773
Open
lukaszlenart wants to merge 8 commits into
Open
WW-4858 Honor parameter filtering during JSON population#1773lukaszlenart wants to merge 8 commits into
lukaszlenart wants to merge 8 commits into
Conversation
…ON population Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…opulation Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…on JSON population Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ON population Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…es to JSON input Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…er comments Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
This was referenced Jul 10, 2026
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 WW-4858
What & why
JSONInterceptorpopulates action/model properties from a JSON request body viaJSONPopulator(pure Java reflection over bean setters), which historically bypassed most of the name/value acceptability controls thatParametersInterceptorapplies to ordinary HTTP parameters. WW-5624 already retrofitted@StrutsParameterauthorization onto this path; this change closes the remaining consistency gaps.Population stays pure-reflection — no OGNL name evaluation is introduced (that is intentionally kept out of the JSON path as a security property). All filtering hooks into the single existing recursive tree-walk, using the same dotted/indexed paths (
address.city,items[0].name) thatParametersInterceptoruses, so the shared pattern checkers behave equivalently on JSON and form input.Controls added to the JSON population path
Always-on (security / app-owned):
ExcludedPatternsChecker/AcceptedPatternsCheckersingletons (same instancesParametersInterceptoruses).ParameterNameAware/ParameterValueAwareaction callbacks.@StrutsParameterauthorization (unchanged, from WW-5624).Opt-in (default off — preserves existing behavior for permissive JSON apps):
setExcludedValuePatterns/setAcceptedValuePatterns).excludeProperties/includePropertiesto input, gated byapplyPropertyFiltersToInput.Scope notes
application/json-rpc, SMD method invocation) is out of scope — it binds to method arguments, not stack properties.ParametersInterceptoris not modified.Testing
New tests in
JSONInterceptorTestcover each gap plus nested-object and list-element paths. Full JSON plugin suite passes (mvn test -pl plugins/json -am -DskipAssembly).🤖 Generated with Claude Code