Improved the logging message of log4j-patch

This commit is contained in:
Glavo
2021-12-19 13:37:02 +08:00
committed by Yuhui Huang
parent cc28f1d5b5
commit 350d63231f
2 changed files with 2 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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.");
}
}