From a9f07e0d3ebb41d24d11e2bdb0ee872fa72072ca Mon Sep 17 00:00:00 2001 From: John Zhuge Date: Mon, 17 Apr 2017 22:35:50 -0700 Subject: [PATCH] HADOOP-14317. KMSWebServer$deprecateEnv may leak secret. Contributed by John Zhuge. --- .../apache/hadoop/crypto/key/kms/server/KMSWebServer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebServer.java b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebServer.java index 1141824a1a..ced1f690d2 100644 --- a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebServer.java +++ b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebServer.java @@ -105,10 +105,9 @@ private static void deprecateEnv(String varName, Configuration conf, if (value == null) { return; } - String propValue = conf.get(propName); - LOG.warn("Environment variable {} = '{}' is deprecated and overriding" - + " property {} = '{}', please set the property in {} instead.", - varName, value, propName, propValue, confFile); + LOG.warn("Environment variable {} is deprecated and overriding" + + " property {}, please set the property in {} instead.", + varName, propName, confFile); conf.set(propName, value, "environment variable " + varName); }