Skip to content

Commit

Permalink
thank you java for being such an asshole
Browse files Browse the repository at this point in the history
  • Loading branch information
GraxCode committed May 9, 2020
1 parent 2733c4d commit 9f50993
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 63 deletions.
52 changes: 0 additions & 52 deletions src/me/nov/threadtear/security/VMExtraSecurity.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/me/nov/threadtear/security/VMSecurityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class VMSecurityManager extends SecurityManager {
private static boolean grantAll;
private static boolean checkReflection = true;
private static boolean checkReflection = false;

@Override
public void checkPermission(Permission perm) {
Expand Down
10 changes: 0 additions & 10 deletions src/me/nov/threadtear/vm/VM.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import me.nov.threadtear.Threadtear;
import me.nov.threadtear.io.Conversion;
import me.nov.threadtear.security.VMExtraSecurity;
import me.nov.threadtear.util.asm.*;

public class VM extends ClassLoader implements Opcodes {
Expand Down Expand Up @@ -59,15 +58,6 @@ public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundExce
if (name.contains("/"))
throw new IllegalArgumentException();
if (name.matches(RT)) {
if (name.equals("java.lang.reflect.AccessibleObject")) {
if (loaded.containsKey(name)) {
return loaded.get(name);
}
Class<?> acc = bytesToClass(name, Conversion.toBytecode0(VMExtraSecurity.rewriteAccessibleObject()));
Threadtear.logger.warning("Redefined java.lang.reflect.AccessibleObject for more security, a class called setAccessible(true).");
loaded.put(name, acc);
return acc;
}
return super.loadClass(name, resolve);
}
if (loaded.containsKey(name)) {
Expand Down

0 comments on commit 9f50993

Please sign in to comment.