You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacopo Cappellato (Jira)" <ji...@apache.org> on 2026/03/16 07:56:00 UTC
[jira] [Closed] (OFBIZ-13371) Allow to optionally opt out from whitelisted static calls in Freemarker
[ https://issues.apache.org/jira/browse/OFBIZ-13371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacopo Cappellato closed OFBIZ-13371.
-------------------------------------
Resolution: Fixed
Thank you Konstantinos, this contribution has been merged into trunk and release24.09.
> Allow to optionally opt out from whitelisted static calls in Freemarker
> -----------------------------------------------------------------------
>
> Key: OFBIZ-13371
> URL: https://issues.apache.org/jira/browse/OFBIZ-13371
> Project: OFBiz
> Issue Type: Improvement
> Reporter: Konstantinos Marinos
> Assignee: Jacopo Cappellato
> Priority: Major
> Fix For: 24.09.06
>
>
> Introduced in this commit [https://github.com/apache/ofbiz-framework/commit/05a0676c28b38324649fa1ecf8f46fcb9d38eabe], all static method (shared by the "Static" variable) in Freemarker templates need to be explicitly whitelisted so they can be called.
>
> Although this gives a lot of control over the execution context inside the freemarker templates, it might translate to a lot of effort for existing projects that rely heavily on custom plugins to upgrade to this version without introducing breaking changes, since the maintainers or plugin authors would have to create a comprehensive list of all the fully qualified names of methods used so that it can be included in the whitelist.
>
> For this reason, I propose to allow the whitelist to be turned off globally through a security property (it can be configured to be enabled by default), to allow all projects to benefit from upgrading to this version but also be able to plan the effort for updating their whitelists at a more comfortable pace.
>
> In any case, the developers that decide to go back to the unrestricted "Static" variable, should be warned in a comment about the implications of their decision.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)