Fix CVE-2021-44228 again

https://github.com/apache/logging-log4j2/pull/614
This commit is contained in:
Kylepoops
2021-12-11 13:58:39 +08:00
committed by Yuhui Huang
parent 4b6b5c2f0e
commit 4f28cdd58f

View File

@@ -440,7 +440,7 @@ public class DefaultLauncher extends Launcher {
private Map<String, String> getEnvVars() {
String versionName = Optional.ofNullable(options.getVersionName()).orElse(version.getId());
Map<String, String> env = new HashMap<>();
env.put("FORMAT_MESSAGES_PATTERN_DISABLE_LOOKUPS", "true");
env.put("LOG4J_FORMAT_MSG_NO_LOOKUPS", "true");
env.put("INST_NAME", versionName);
env.put("INST_ID", versionName);
env.put("INST_DIR", repository.getVersionRoot(version.getId()).getAbsolutePath());