[ 
https://issues.apache.org/jira/browse/WW-5713?focusedWorklogId=1039034&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1039034
 ]

ASF GitHub Bot logged work on WW-5713:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Sep/26 09:48
            Start Date: 01/Sep/26 09:48
    Worklog Time Spent: 10m 
      Work Description: kuranikaran opened a new pull request, #1890:
URL: https://github.com/apache/struts/pull/1890

   ## Summary
   
   The Tiles plugin registers separate `S2:` and legacy `OGNL:` 
attribute-expression evaluators. The legacy evaluator operates directly against 
the Tiles `Request` and does not use the Struts OGNL controls used by `S2:`.
   
   This change keeps `OGNL:` registered but makes it fail closed by default. 
Evaluation throws Tiles `EvaluationException` with migration guidance and does 
not parse or evaluate the expression.
   
   Applications that temporarily require the existing raw behavior can 
explicitly set:
   
   ```xml
   <constant name="struts.tiles.ognl.legacy.enabled" value="true"/>
   ```
   
   The compatibility constant and legacy evaluator are deprecated in Struts 
7.4.0 and targeted for removal in Struts 8.0.0. The raw evaluator and its 
global `OgnlRuntime` Tiles `Request` property-accessor setup are constructed 
only when legacy mode is explicitly enabled. Legacy mode preserves the existing 
behavior and emits one startup/container-construction warning.
   
   `S2:`, `I18N:`, and `EL:` remain unchanged.
   
   ## Testing
   
   - compiled the Tiles plugin
   - ran the focused evaluator, factory, listener-lifecycle, integration, and 
legacy compatibility tests in both class orders
   - ran the complete Tiles module test suite (558 tests)
   - ran the complete Tiles module `verify` lifecycle, including Apache RAT and 
JAR packaging
   - inspected compiled bytecode to confirm the disabled evaluator contains no 
OGNL reference and the default factory branch does not construct the raw 
evaluator
   
   ## Classification
   
   This is defense-in-depth hardening. No attacker-controlled expression source 
or concrete vulnerability impact has been demonstrated, and no security 
advisory is proposed.
   
   Issue: [WW-5713](https://issues.apache.org/jira/browse/WW-5713)
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1039034)
    Remaining Estimate: 0h
            Time Spent: 10m

> Fail closed for legacy Tiles OGNL evaluation
> --------------------------------------------
>
>                 Key: WW-5713
>                 URL: https://issues.apache.org/jira/browse/WW-5713
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Tiles
>            Reporter: Karan Kurani
>            Priority: Major
>             Fix For: 7.4.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The Struts Tiles plugin registers separate {{S2:}} and legacy {{OGNL:}} 
> attribute-expression evaluators.
> The {{S2:}} evaluator processes ValueStack expressions through the Struts 
> OGNL facilities. The legacy {{OGNL:}} evaluator evaluates against the Tiles 
> {{Request}} and does not use the Struts OGNL security controls used by 
> {{{}S2:{}}}.
> This hardening change keeps {{OGNL:}} registered but makes it fail closed by 
> default. Evaluation throws Tiles {{EvaluationException}} with migration 
> guidance directing users to {{{}S2:{}}}.
> Applications that temporarily require the existing raw behavior may 
> explicitly set:
> {{struts.tiles.ognl.legacy.enabled=true}}
> The compatibility flag defaults to {{false}} and is targeted for removal in 
> Struts 8.0.0.
> The raw evaluator and its global {{OgnlRuntime}} {{Request}} 
> property-accessor setup are constructed only when legacy mode is explicitly 
> enabled. This avoids mutating the shared OGNL runtime for applications using 
> the secure default.
> When legacy mode is enabled, the existing raw behavior is preserved and a 
> clear startup migration warning is emitted.
> {{{}S2:{}}}, {{{}I18N:{}}}, and {{EL:}} remain unchanged.
> Tests cover:
>  * default fail-closed behavior;
>  * exact migration guidance;
>  * non-evaluation of expression markers;
>  * construction gating;
>  * absence of global accessor initialization under the default;
>  * explicit legacy compatibility behavior;
>  * startup warning behavior; and
>  * real servlet-backed {{S2:}} evaluation.
> This is defense-in-depth hardening. No attacker-controlled expression source 
> or concrete vulnerability impact has been demonstrated, and no security 
> advisory is proposed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to