diff options
author | 2019-10-29 15:54:42 +0000 | |
---|---|---|
committer | 2019-10-30 13:04:59 +0000 | |
commit | a4e98021b301f4146fd45e7089d8749f3b8448b9 (patch) | |
tree | 96a6df9b323014e97f393770e96a22c7998387aa /reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base | |
parent | 53b6e1a6cea267a6ad48c1accc3371dd6dab4112 (diff) |
update getBasicAuthUserName
prevent excess error throwing in getBasicAuthUserName
Issue-ID: LOG-1184
Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com>
Change-Id: I226185ef19525095dbb9e5f480e43bd7b087bf8f
Diffstat (limited to 'reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base')
-rw-r--r-- | reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java index d0caa46..a900968 100644 --- a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java +++ b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java @@ -248,7 +248,7 @@ public class MDCSetup { protected String getBasicAuthUserName(SimpleMap headers) { String encodedAuthorizationValue = headers.get(HttpHeaders.AUTHORIZATION); - if (encodedAuthorizationValue != null) { + if (encodedAuthorizationValue != null && encodedAuthorizationValue.startsWith("Basic")) { try { // This will strip the word Basic and single space encodedAuthorizationValue = encodedAuthorizationValue.substring(6); |