Improved the logging message of log4j-patch

This commit is contained in:
Glavo authored and Yuhui Huang committed 2021-12-19 17:17:40 +08:00
1 parent cc28f1d5b5
commit 350d63231f
2 files changed
+2 -2

No files matched your search

@@ -65,7 +65,7 @@ public class Interpolator implements StrLookup {
lookups.put("sys", new SystemPropertiesLookup());
lookups.put("env", new EnvironmentLookup());
// lookups.put("jndi", new JndiLookup());
LOGGER.warn("log4j-patch works, JNDI lookup is disabled");
LOGGER.warn("Log4j patch works, JNDI lookup is disabled. This message is not a warning, it represents the successful elimination of some security risks. You should be able to play safely.");
try {
if (Class.forName("javax.servlet.ServletContext") != null) {
@@ -8,6 +8,6 @@ package org.apache.logging.log4j.core.lookup;
public class JndiLookup {
public JndiLookup() {
throw new NoClassDefFoundError("JNDI lookup is disabled");
throw new NoClassDefFoundError("JNDI lookup is disabled. This is not an error. We are blocking some vulnerabilities through it. You should be able to play safely.");
}
}