Skip to content

WW-5839 Reject unconfined wildcard substitution into class= attributes - #2115

Open
g0w6y wants to merge 1 commit into
apache:mainfrom
g0w6y:WW-5839-input-hygiene-hardening
Open

g0w6y wants to merge 1 commit into
apache:mainfrom
g0w6y:WW-5839-input-hygiene-hardening

Conversation

@g0w6y

@g0w6y g0w6y commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes WW-5839

AbstractMatcher/ActionConfigMatcher: a wildcard {n} substituted into an action/result/exception-mapping class= attribute was unconfined, unlike the sibling method-name slot (ActionConfig#isAllowedMethod). A substituted segment containing . or / is now rejected rather than used verbatim.

Reachable only if a developer writes a wildcard mapping with a substituted class name -- application-responsibility, not a default-config issue.

Verified: WildcardClassNameHardeningTest (new, 2 tests). Full core: 3742/0 failures.

@lukaszlenart

Copy link
Copy Markdown
Member

Thanks for this. The three changes are unrelated, touch different modules and will need separate review rounds and separate release notes, so please split this PR into three, each with its own Jira ticket:

  1. Wildcard substitution into class=: keep it on WW-5839, and narrow that ticket's summary and description to this item.
  2. Path-stripped original upload file name: use WW-5840, which already describes this change. Please title the PR WW-5840 ....
  3. Struts Boot session tracking (cookie-only tracking, SameSite): please open a new ticket for it (component Boot, if available).

Review comments will follow on each PR separately. Thanks!

AbstractMatcher/ActionConfigMatcher: a wildcard "{n}" substituted into an
action/result/exception-mapping class= attribute was unconfined, unlike the
sibling method-name slot (ActionConfig#isAllowedMethod). A substituted segment
containing '.' or '/' is now rejected rather than used verbatim.

Reachable only if a developer writes a wildcard mapping with a substituted
class name -- application-responsibility, not a default-config issue.

Tests: WildcardClassNameHardeningTest (new, 2 tests). Full core suite:
3742/0 failures.
@g0w6y
g0w6y force-pushed the WW-5839-input-hygiene-hardening branch from ec24682 to 6619965 Compare November 7, 2026 09:26
@g0w6y g0w6y changed the title WW-5839 Harden wildcard class-name substitution, raw upload file names, and Boot session tracking WW-5839 Reject unconfined wildcard substitution into class= attributes Nov 7, 2026
@g0w6y

g0w6y commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Done -- this PR is now narrowed to just the wildcard class-name item (6619965), title/description updated to match. #2116 is open against WW-5840 for the upload file name item. Still working on a new ticket for the Boot session tracking item before opening its PR. Will update WW-5839's Jira description to match too.

@g0w6y

g0w6y commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

All 3 split out now: this PR (WW-5839, wildcard class-name), #2116 (WW-5840, upload file name), and #2117 (WW-5841, new ticket, Boot session tracking).

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.

2 participants