зеркало из https://github.com/mozilla/pjs.git
Fix for Bug 190841 � Generated classes have too low privileges
This commit is contained in:
Родитель
e8e13af93a
Коммит
da8b5e3693
|
@ -70,6 +70,10 @@ public class PolicySecurityController extends SecurityController
|
|||
// cleanup of either CodeSource or ClassLoader objects.
|
||||
private static final Map callers = new WeakHashMap();
|
||||
|
||||
public Class getStaticSecurityDomainClassInternal() {
|
||||
return CodeSource.class;
|
||||
}
|
||||
|
||||
private static class Loader extends SecureClassLoader
|
||||
implements GeneratedClassLoader
|
||||
{
|
||||
|
|
|
@ -148,6 +148,16 @@ public abstract class SecurityController
|
|||
return loader;
|
||||
}
|
||||
|
||||
public static Class getStaticSecurityDomainClass() {
|
||||
SecurityController sc = Context.getContext().getSecurityController();
|
||||
return sc == null ? null : sc.getStaticSecurityDomainClassInternal();
|
||||
}
|
||||
|
||||
public Class getStaticSecurityDomainClassInternal()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dynamic security domain that allows an action only if it is allowed
|
||||
* by the current Java stack and <i>securityDomain</i>. If
|
||||
|
|
|
@ -48,6 +48,10 @@ import org.mozilla.javascript.*;
|
|||
public class JavaPolicySecurity extends SecurityProxy
|
||||
{
|
||||
|
||||
public Class getStaticSecurityDomainClassInternal() {
|
||||
return ProtectionDomain.class;
|
||||
}
|
||||
|
||||
private static class Loader extends ClassLoader
|
||||
implements GeneratedClassLoader
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче