Hi all,
We have once again upgraded Struts in Confluence 8.8 and introduced 2 breaking changes as they were deemed necessary to enhance the security of our customers.
–
StrutsParameter Annotation
All Struts Action setters, getters or public fields which are intended for parameter injection must now be annotated with the new @StrutsParameter
annotation.
This is in contrast to previous versions of Confluence where only “complex” parameters, that is those represented by getters that return DTOs, required annotating with @ParameterSafe
.
Note that the deprecated @ParameterSafe
annotation will continue to be recognised for backwards compatibility but we recommend migrating to the new annotation which offers fine-grained control with respect to parameter injection depth.
Whilst the new parameter annotation will be present in 8.8 EAP2, the requirement to annotate ALL parameters will be feature flagged off until 8.8 BETA1.
Please refer to the ‘Defining Request Parameters’ section in the Struts Module documentation for further information.
OGNL Class Allowlist
OGNL expressions are now subject to a strict class allowlist. Most plugins will function with no additional configuration as Struts will intelligently allowlist classes based on the Action classes declared in your Struts module as well as parameter annotations on your Action classes.
However, if you encounter any issues or log warnings, we have implemented a new Struts module element to allow plugins to manually allowlist any necessary classes or packages.
The OGNL Class Allowlist will be permanently enabled from 8.8 EAP2.
Please refer to the ‘OGNL Class Allowlist’ section in the Struts Module documentation for further information.
–
8.5 LTS Backports
The OGNL Class Allowlist WILL be backported to Confluence 8.5.6. We recommend ensuring compatibility of the Struts components of your plugin with Confluence 8.8 as soon as possible.
Whilst the @StrutsParameter
annotation will be available beginning in Confluence 8.5.6, we do not currently intend to extend the annotation requirement to all Struts parameters as in Confluence 8.8. Instead, the present requirement of annotating only “complex” parameters will remain.
–
Regards,
Kusal Kithul-Godage
Software Engineer, Confluence Data Center