mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-02 16:49:10 +00:00
[BUGFIX] Granting access instead of blocking it
This commit is contained in:
@@ -15,16 +15,13 @@ import java.security.ProtectionDomain;
|
||||
public class ClassRedirect {
|
||||
|
||||
public static ProtectionDomain getProtectionDomain(final Class<?> clazz) {
|
||||
if (validStack()) {
|
||||
return AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
|
||||
public ProtectionDomain run() {
|
||||
return clazz.getProtectionDomain();
|
||||
}
|
||||
});
|
||||
}
|
||||
System.err.println(clazz.getName() + " getProtectionDomain request granted.");
|
||||
|
||||
System.err.println(clazz.getName() + " getProtectionDomain request Blocked.");
|
||||
throw RedirectClassAdapter.createSecurityException();
|
||||
return AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
|
||||
public ProtectionDomain run() {
|
||||
return clazz.getProtectionDomain();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static Object newInstance(Class<?> c) throws IllegalAccessException, InstantiationException {
|
||||
|
||||
Reference in New Issue
Block a user