Improved the logging message of log4j-patch
This commit is contained in:
@@ -65,7 +65,7 @@ public class Interpolator implements StrLookup {
|
|||||||
lookups.put("sys", new SystemPropertiesLookup());
|
lookups.put("sys", new SystemPropertiesLookup());
|
||||||
lookups.put("env", new EnvironmentLookup());
|
lookups.put("env", new EnvironmentLookup());
|
||||||
// lookups.put("jndi", new JndiLookup());
|
// 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 {
|
try {
|
||||||
if (Class.forName("javax.servlet.ServletContext") != null) {
|
if (Class.forName("javax.servlet.ServletContext") != null) {
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ package org.apache.logging.log4j.core.lookup;
|
|||||||
|
|
||||||
public class JndiLookup {
|
public class JndiLookup {
|
||||||
public 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.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user