[
https://issues.apache.org/jira/browse/WW-5268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17689295#comment-17689295
]
Yasser Zamani commented on WW-5268:
-----------------------------------
Thanks for the PR but typically you wouldn't use those classes directly in an
OGNL expression. If you really need it for example instead of "System.exit()"
OGNL expression, define a method in your action as below:
{code:java}
Class MyAction {
public String myExit()
{
return System.exit();
}
}
{code}
and then use "myExit()" in your OGNL expression String.
> Add configuration option to exempt classes from OGNL package exclusions
> -----------------------------------------------------------------------
>
> Key: WW-5268
> URL: https://issues.apache.org/jira/browse/WW-5268
> Project: Struts 2
> Issue Type: Improvement
> Components: Core
> Reporter: Kusal Kithul-Godage
> Priority: Minor
> Fix For: 6.2.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> It is currently possible to exclude packages from OGNL evaluation using
> `struts.excludedPackageNamePatterns` and `struts.excludedPackageNames`.
> There may exist a scenario where you wish to have certain packages
> excluded/blocklisted by default, but exempt specific classes from these
> packages that have been assessed to be safe.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)