Prohibit JNDI remote invoke

This commit is contained in:
Glavo authored and Yuhui Huang committed 2021-12-11 23:52:03 +08:00
1 parent bcb29ef792
commit 5ffbd16800
1 file changed
+3
@@ -181,6 +181,9 @@ public class DefaultLauncher extends Launcher {
// Fix RCE vulnerability of log4j2
res.addDefault("-Dlog4j2.formatMsgNoLookups=", "true");
res.addDefault("-Djava.rmi.server.useCodebaseOnly=", "true");
res.addDefault("-Dcom.sun.jndi.rmi.object.trustURLCodebase=", "false");
res.addDefault("-Dcom.sun.jndi.cosnaming.object.trustURLCodebase=", "false");
}
Proxy proxy = options.getProxy();