From 4cff613b18dfbe7278b0f241cbc598a5fb8bbc18 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Sun, 19 Dec 2021 08:59:42 +0100 Subject: [PATCH] Fixed: [SECURITY] CVE-2021-45105: Apache Log4j2 (OFBIZ-12470) The configuration seems to have changed. log4j-slf4j18-impl available in Maven as 2.16.0 is not in 2.17.0. Also log4j-web is now needed. In R18 as compile when in trunk as readonly... I was guided by this block in console.log of trunk demo: Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/util/SetUtils at org.apache.logging.log4j.web.Log4jWebInitializerImpl.getConfigURI(Log4jWebInitializerImpl.java:196) at org.apache.logging.log4j.web.Log4jWebInitializerImpl.initializeNonJndi(Log4jWebInitializerImpl.java:175) at org.apache.logging.log4j.web.Log4jWebInitializerImpl.start(Log4jWebInitializerImpl.java:112) at org.apache.logging.log4j.web.Log4jServletContainerInitializer.onStartup(Log4jServletContainerInitializer.java:57) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5219) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) I'll dbl-check why, notably about log4j-slf4j18-impl. At least it works well like that. --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 1053028ff3..2b566926b0 100644 --- a/build.gradle +++ b/build.gradle @@ -191,6 +191,7 @@ dependencies { compile 'org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1' compile 'org.apache.httpcomponents:httpclient-cache:4.5.6' compile 'org.apache.logging.log4j:log4j-api:2.17.0' // the API of log4j 2 + compile 'org.apache.logging.log4j:log4j-web:2.17.0' //??? compile 'org.apache.poi:poi:3.17' compile 'org.apache.pdfbox:pdfbox:2.0.24' compile 'org.apache.shiro:shiro-core:1.4.0'