Fully restrict the org.bukkit and net.minecraft namespace

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
Bukkit/Spigot
2012-08-19 05:53:30 -05:00
parent a0438b2a20
commit 9b80392085

View File

@@ -30,6 +30,9 @@ public class PluginClassLoader extends URLClassLoader {
}
protected Class<?> findClass(String name, boolean checkGlobal) throws ClassNotFoundException {
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
throw new ClassNotFoundException(name);
}
Class<?> result = classes.get(name);
if (result == null) {