mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 08:39:12 +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 class ClassRedirect {
|
||||||
|
|
||||||
public static ProtectionDomain getProtectionDomain(final Class<?> clazz) {
|
public static ProtectionDomain getProtectionDomain(final Class<?> clazz) {
|
||||||
if (validStack()) {
|
System.err.println(clazz.getName() + " getProtectionDomain request granted.");
|
||||||
return AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
|
|
||||||
public ProtectionDomain run() {
|
|
||||||
return clazz.getProtectionDomain();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
System.err.println(clazz.getName() + " getProtectionDomain request Blocked.");
|
return AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
|
||||||
throw RedirectClassAdapter.createSecurityException();
|
public ProtectionDomain run() {
|
||||||
|
return clazz.getProtectionDomain();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object newInstance(Class<?> c) throws IllegalAccessException, InstantiationException {
|
public static Object newInstance(Class<?> c) throws IllegalAccessException, InstantiationException {
|
||||||
|
|||||||
Reference in New Issue
Block a user