[jboss-cvs] JBossAS SVN: r94428 - trunk/console/src/main/java/org/jboss/console/twiddle.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 6 14:34:16 EDT 2009
Author: mmoyses
Date: 2009-10-06 14:34:16 -0400 (Tue, 06 Oct 2009)
New Revision: 94428
Modified:
trunk/console/src/main/java/org/jboss/console/twiddle/Twiddle.java
Log:
JBAS-7307: masking password in twiddle log
Modified: trunk/console/src/main/java/org/jboss/console/twiddle/Twiddle.java
===================================================================
--- trunk/console/src/main/java/org/jboss/console/twiddle/Twiddle.java 2009-10-06 18:28:06 UTC (rev 94427)
+++ trunk/console/src/main/java/org/jboss/console/twiddle/Twiddle.java 2009-10-06 18:34:16 UTC (rev 94428)
@@ -404,7 +404,18 @@
{
for(int a = 0; a < args.length; a ++)
{
- log.debug("args["+a+"]="+args[a]);
+ //masks password
+ try {
+ if (args[a-1].equals("-p"))
+ log.debug("args["+a+"]=xxxx");
+ else
+ log.debug("args["+a+"]="+args[a]);
+ }
+ catch (IndexOutOfBoundsException ioobe)
+ {
+ //takes care of the first argument
+ log.debug("args["+a+"]="+args[a]);
+ }
}
String sopts = "-:hH:u:p:c:D:s:a:q";
LongOpt[] lopts =
More information about the jboss-cvs-commits
mailing list