From 5d329a70d197cea551b0e26a55c73d099f5e8093 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Tue, 25 Sep 2018 13:59:51 -0500 Subject: [PATCH] ARTEMIS-2087 fix NPE; mask password in example --- .../apache/activemq/artemis/utils/PasswordMaskingUtil.java | 2 +- .../src/main/resources/activemq/server0/management.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java index be560465f1..796f1d823c 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java @@ -61,7 +61,7 @@ public final class PasswordMaskingUtil { } public static boolean isEncMasked(String password) { - return (password.startsWith(BEGIN_ENC) && password.endsWith(END_ENC)); + return password == null ? false : (password.startsWith(BEGIN_ENC) && password.endsWith(END_ENC)); } //remove ENC() from the password body diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml index 802079c88f..dd15e5c218 100644 --- a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml +++ b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml @@ -21,9 +21,9 @@ connector-host="localhost" secured="true" key-store-path="${data.dir}/../etc/server-side-keystore.jks" - key-store-password="secureexample" + key-store-password="ENC(2a7c211d21c295cdbcde3589c205decb)" trust-store-path="${data.dir}/../etc/server-side-truststore.jks" - trust-store-password="secureexample"/> + trust-store-password="ENC(2a7c211d21c295cdbcde3589c205decb)"/>