This is an automated email from the ASF dual-hosted git repository. mattrpav pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push: new 33ceb9fe8 [AMQ-9235] Convert activemq-web to use j.util.Base64 33ceb9fe8 is described below commit 33ceb9fe8a5678c82314cbb4ac80d140eafb85b5 Author: Matt Pavlovich <m...@hyte.io> AuthorDate: Sat Oct 7 08:03:53 2023 -0500 [AMQ-9235] Convert activemq-web to use j.util.Base64 --- activemq-web/pom.xml | 4 ---- activemq-web/src/main/java/org/apache/activemq/web/WebClient.java | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/activemq-web/pom.xml b/activemq-web/pom.xml index ea51dbf30..a522817c8 100644 --- a/activemq-web/pom.xml +++ b/activemq-web/pom.xml @@ -58,10 +58,6 @@ <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </dependency> - <dependency> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>activemq-unit-tests</artifactId> diff --git a/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java b/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java index cbf8ecf7b..2202f51bd 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.ArrayList; +import java.util.Base64; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -385,7 +386,7 @@ public class WebClient implements HttpSessionActivationListener, HttpSessionBind String[] tokens = auth.split(" "); if (tokens.length == 2) { String encoded = tokens[1].trim(); - String credentials = new String(javax.xml.bind.DatatypeConverter.parseBase64Binary(encoded)); + String credentials = new String(Base64.getDecoder().decode(encoded)); String[] creds = credentials.split(":"); if (creds.length == 2) { client.setUsername(creds[0]);