[
https://issues.apache.org/jira/browse/WW-5839?focusedWorklogId=1056525&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056525
]
ASF GitHub Bot logged work on WW-5839:
--------------------------------------
Author: ASF GitHub Bot
Created on: 22/Nov/26 15:06
Start Date: 22/Nov/26 15:06
Worklog Time Spent: 10m
Work Description: lukaszlenart commented on PR #2115:
URL: https://github.com/apache/struts/pull/2115#issuecomment-7081045914
Linking a related proposal: #2155 adds a `THREAT_MODEL.md` §11a entry that
classifies wildcard values substituted into `class=` as application
responsibility. The mapping template is developer-written configuration, no
shipped configuration does this, and the resulting name is never evaluated.
The two changes are alternatives, so I'd like to settle that question before
reviewing this PR further. If #2155 is accepted, the check added here is not
needed. If this PR is merged instead, the §11a entry will be rewritten to treat
the new check as a control.
Issue Time Tracking
-------------------
Worklog Id: (was: 1056525)
Time Spent: 1h 10m (was: 1h)
> Reject unconfined wildcard substitution into class= attributes
> --------------------------------------------------------------
>
> Key: WW-5839
> URL: https://issues.apache.org/jira/browse/WW-5839
> Project: Struts 2
> Issue Type: Improvement
> Components: Core
> Affects Versions: 6.12.0, 7.0.0, 7.3.0, 7.4.0
> Reporter: Gouri Sankar A
> Priority: Minor
> Fix For: 7.6.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> AbstractMatcher/ActionConfigMatcher: a wildcard "\{n}" substituted into an
> action/result/exception-mapping class= attribute was unconfined -- any
> matched path segment, including one containing "." or "/", landed verbatim in
> the resulting class name. The sibling method-name slot is already gated
> (ActionConfig#isAllowedMethod); there was no equivalent gate for the
> class-name slot.
> Fix rejects a substituted value outside [A-Za-z0-9_$]* when filling a
> class-name slot, instead of using it verbatim.
> Reachable only if a developer writes a wildcard mapping that substitutes into
> class= -- application-responsibility, not a default-config issue.
> Tests: WildcardClassNameHardeningTest (new, 2 tests). Full core suite: 3742/0
> failures.
> Affected versions: present, same code pattern, by source inspection, in the
> 6.12.0, 7.0.0, 7.3.0 and 7.4.0 tags.
> Pull request: https://github.com/apache/struts/pull/2115 (already open,
> narrowed)
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)