You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2023/05/04 10:28:00 UTC

[jira] [Created] (JEXL-397) Dynamic proxy should not require specific permission

Henri Biestro created JEXL-397:
----------------------------------

             Summary: Dynamic proxy should not require specific permission
                 Key: JEXL-397
                 URL: https://issues.apache.org/jira/browse/JEXL-397
             Project: Commons JEXL
          Issue Type: Bug
    Affects Versions: 3.3
            Reporter: Henri Biestro
            Assignee: Henri Biestro
             Fix For: 3.4


With the default restricted permissions, dynamic proxies can not be introspected since they extend java.lang.reflect.Proxy whose package is denied.

The workaround is to explicitly allow them as in:
{code:java}
JexlPermissions p = new JexlPermissions.Delegate(JexlPermissions.RESTRICTED) {
  @Override public boolean allow(Class<?> clazz) {
    return Proxy.isProxyClass(clazz) || super.allow(clazz);
  }
};
{code}



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