This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 1624b2d  [Dubbo-AbstractConfig] Fix password be print in plain text 
(#6931)
1624b2d is described below

commit 1624b2d3d1fc38aa94ef5ed3b305c063bc185b88
Author: FavorMylikes <[email protected]>
AuthorDate: Mon Apr 12 16:36:16 2021 +0800

    [Dubbo-AbstractConfig] Fix password be print in plain text (#6931)
    
    * Update AbstractConfig.java
    
    Hidden the important password information to avoid be printed in plain text 
into the logger file
    
    * Update AbstractConfig.java
    
    change == to equals
---
 dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java 
b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
index db2b583..988ab1b 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
@@ -519,7 +519,7 @@ public abstract class AbstractConfig implements 
Serializable {
                             buf.append(" ");
                             buf.append(key);
                             buf.append("=\"");
-                            buf.append(value);
+                            buf.append(key.equals("password") ? "******" : 
value);
                             buf.append("\"");
                         }
                     }

Reply via email to