You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by xa...@apache.org on 2007/04/30 18:02:13 UTC
svn commit: r533817 - in /incubator/ivy/core/trunk: CHANGES.txt
src/java/org/apache/ivy/util/Credentials.java
Author: xavier
Date: Mon Apr 30 11:02:12 2007
New Revision: 533817
URL: http://svn.apache.org/viewvc?view=rev&rev=533817
Log:
FIX: Credentials are shown in build log even if debug is not enabled (IVY-486) (thanks to Gilles Scokart)
Modified:
incubator/ivy/core/trunk/CHANGES.txt
incubator/ivy/core/trunk/src/java/org/apache/ivy/util/Credentials.java
Modified: incubator/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?view=diff&rev=533817&r1=533816&r2=533817
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Mon Apr 30 11:02:12 2007
@@ -48,7 +48,8 @@
=====================================
- IMPROVEMENT: Allow "main" parameters to be passed directly (instead of using -args flag) (IVY-480) (thanks to Archie Cobbs)
-- BUG: ivy:install ant task does not fail on error (IVY-475) (thanks to Jeffrey Blatttman)
+- FIX: ivy:install ant task does not fail on error (IVY-475) (thanks to Jeffrey Blatttman)
+- FIX: Credentials are shown in build log even if debug is not enabled (IVY-486) (thanks to Gilles Scokart)
2.0.0-alpha1-incubating
=====================================
Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/util/Credentials.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/util/Credentials.java?view=diff&rev=533817&r1=533816&r2=533817
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/util/Credentials.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/util/Credentials.java Mon Apr 30 11:02:12 2007
@@ -56,8 +56,22 @@
}
}
+ /**
+ * Return a string that can be used for debug purpose. It contains only stars for each password character.
+ */
public String toString() {
- return getKey() + " " + getUserName() + "/" + getPasswd();
+ return getKey() + " " + getUserName() + "/" + getPasswdAsStars();
+ }
+
+ private String getPasswdAsStars() {
+ if (_passwd == null) {
+ return null;
+ }
+ StringBuffer sb = new StringBuffer();
+ for (int i = _passwd.length(); i>0; i--) {
+ sb.append('*');
+ }
+ return sb.toString();
}
public boolean equals(Object o) {