* Issue #3653 Ensure custom SecurityManager.checkPermission is used.
This commit is contained in:
parent
5760795f96
commit
671d1cb2b8
|
@ -308,6 +308,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
public void setUsingSecurityManager(boolean usingSecurityManager)
|
public void setUsingSecurityManager(boolean usingSecurityManager)
|
||||||
{
|
{
|
||||||
|
if (usingSecurityManager && System.getSecurityManager() == null)
|
||||||
|
throw new IllegalStateException("No security manager");
|
||||||
_usingSecurityManager = usingSecurityManager;
|
_usingSecurityManager = usingSecurityManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2612,7 +2614,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
||||||
else
|
else
|
||||||
callerLoader = callerLoader.getParent();
|
callerLoader = callerLoader.getParent();
|
||||||
}
|
}
|
||||||
AccessController.checkPermission(new RuntimePermission("getClassLoader"));
|
System.getSecurityManager().checkPermission(new RuntimePermission("getClassLoader"));
|
||||||
return _classLoader;
|
return _classLoader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue