From fd55683e165f5ea53ee913bf727cc21facf84737 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Tue, 19 Mar 2024 11:53:24 -0700 Subject: [PATCH 1/2] cadc-rest: make RestAction.appName use whole context path for uniqueness --- cadc-rest/build.gradle | 2 +- cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cadc-rest/build.gradle b/cadc-rest/build.gradle index 970d4e7f..c948a6d2 100644 --- a/cadc-rest/build.gradle +++ b/cadc-rest/build.gradle @@ -16,7 +16,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '1.3.18' +version = '1.3.19' description = 'OpenCADC REST server library' def git_url = 'https://github.com/opencadc/core' diff --git a/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java b/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java index c5f9d7df..c704193b 100644 --- a/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java +++ b/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java @@ -150,7 +150,8 @@ public void init(ServletConfig config) throws ServletException { this.deleteAction = loadAction(config, "delete"); this.headAction = loadAction(config, "head"); - this.appName = config.getServletContext().getServletContextName(); + // appName: war file foo#bar.war, context path /foo/bar -> foo-bar + this.appName = config.getServletContext().getContextPath().substring(1).replaceAll("/", "-"); this.componentID = appName + "." + config.getServletName(); String augment = config.getInitParameter(AUGMENT_SUBJECT_PARAM); if (augment != null && augment.equalsIgnoreCase(Boolean.FALSE.toString())) { From b18519959db3fe2af86877521dd1a7888d74f361 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Wed, 20 Mar 2024 11:10:10 -0700 Subject: [PATCH 2/2] cadc-util: update log4j dependency to min latest --- cadc-util/build.gradle | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/cadc-util/build.gradle b/cadc-util/build.gradle index 32d61655..52fc3b8d 100644 --- a/cadc-util/build.gradle +++ b/cadc-util/build.gradle @@ -16,23 +16,17 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '1.11.0' +version = '1.11.1' description = 'OpenCADC core utility library' def git_url = 'https://github.com/opencadc/core' dependencies { - //compile 'org.apache.logging.log4j:log4j-1.2-api:[2.17.2,3.0)' - //compile 'org.apache.logging.log4j:log4j-api:[2.17.2,3.0)' - //compile 'org.apache.logging.log4j:log4j-core:[2.17.2,3.0)' - //compile 'org.apache.logging.log4j:log4j:[2.17.2,3.0)' - - // log4j 2.18+ suffers from a class loading issue: technical debt - compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2' - compile 'org.apache.logging.log4j:log4j-api:2.17.2' - compile 'org.apache.logging.log4j:log4j-core:2.17.2' - compile 'org.apache.logging.log4j:log4j:2.17.2' - + compile 'org.apache.logging.log4j:log4j-1.2-api:[2.23.1,3.0)' + compile 'org.apache.logging.log4j:log4j-api:[2.23.1,3.0)' + compile 'org.apache.logging.log4j:log4j-core:[2.23.1,3.0)' + compile 'org.apache.logging.log4j:log4j:[2.23.1,3.0)' + compile 'org.bouncycastle:bcprov-jdk18on:[1.70,2.0)' compile 'org.bouncycastle:bcpkix-jdk18on:[1.70,2.0)' compile 'javax.servlet:javax.servlet-api:3.1.0'