WW-5713 Fail closed for legacy Tiles OGNL evaluation - #1890
Conversation
|
Thanks for filing the ticket and the PR, and sorry for the slow turnaround. The evaluator part is right, including the two things that are easy to get wrong and that ruled out
So the hardening itself I'm happy with. What I can't take as it stands is the bootstrap change. The
Also None of this is you going off-piste. Getting the constant to What I'd like instead is to decouple the two: keep the container bootstrap exactly where it is today Two loose ends:
Credit is yours in the release notes either way. |
Summary
The Tiles plugin registers separate
S2:and legacyOGNL:attribute-expression evaluators. The legacy evaluator operates directly against the TilesRequestand does not use the Struts OGNL controls used byS2:.This change keeps
OGNL:registered but makes it fail closed by default. Evaluation throws TilesEvaluationExceptionwith migration guidance and does not parse or evaluate the expression.Applications that temporarily require the existing raw behavior can explicitly set:
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
OgnlRuntimeTilesRequestproperty-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:, andEL:remain unchanged.Testing
verifylifecycle, including Apache RAT and JAR packagingClassification
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