[jboss-cvs] JBossAS SVN: r94430 - branches/JBPAPP_4_2_0_GA_CP/console/src/main/org/jboss/console/twiddle.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 6 14:40:29 EDT 2009
Author: mmoyses
Date: 2009-10-06 14:40:28 -0400 (Tue, 06 Oct 2009)
New Revision: 94430
Modified:
branches/JBPAPP_4_2_0_GA_CP/console/src/main/org/jboss/console/twiddle/Twiddle.java
Log:
JBPAPP-2872: masking password in twiddle log
Modified: branches/JBPAPP_4_2_0_GA_CP/console/src/main/org/jboss/console/twiddle/Twiddle.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/console/src/main/org/jboss/console/twiddle/Twiddle.java 2009-10-06 18:36:35 UTC (rev 94429)
+++ branches/JBPAPP_4_2_0_GA_CP/console/src/main/org/jboss/console/twiddle/Twiddle.java 2009-10-06 18:40:28 UTC (rev 94430)
@@ -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