From 0a819253771373ee2a3e5ba4cd5553724aee6753 Mon Sep 17 00:00:00 2001 From: Rustam Ismailov Date: Wed, 15 Feb 2017 16:00:57 +0200 Subject: [PATCH] Masking password in logs, updated dependencies versions --- pom.xml | 6 +++--- src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index cbd779e5..244e9bce 100644 --- a/pom.xml +++ b/pom.xml @@ -25,11 +25,11 @@ com.cloudhopper.smpp - 6.0.2 + 6.0.3 3.0.2 3.0.0 3.9.6.Final - 1.7.13 + 1.7.23 @@ -72,7 +72,7 @@ ch.qos.logback logback-classic - 1.1.3 + 1.2.1 test diff --git a/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java b/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java index c814b4b7..71b47747 100644 --- a/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java +++ b/src/main/java/com/cloudhopper/smpp/pdu/BaseBind.java @@ -125,7 +125,7 @@ public void appendBodyToString(StringBuilder buffer) { buffer.append("systemId ["); buffer.append(StringUtil.toStringWithNullAsEmpty(this.systemId)); buffer.append("] password ["); - buffer.append(StringUtil.toStringWithNullAsEmpty(this.password)); + buffer.append(StringUtil.toStringWithNullAsEmpty(this.password!=null?(this.password.length()>4?this.password.substring(0,1)+"**"+this.password.substring(this.password.length()-2, this.password.length()-1):this.password):null)); buffer.append("] systemType ["); buffer.append(StringUtil.toStringWithNullAsEmpty(this.systemType)); buffer.append("] interfaceVersion [0x");