diff --git a/hq-util/src/main/java/org/hyperic/util/exec/Execute.java b/hq-util/src/main/java/org/hyperic/util/exec/Execute.java index 17dcb5d85c..995dc8e148 100644 --- a/hq-util/src/main/java/org/hyperic/util/exec/Execute.java +++ b/hq-util/src/main/java/org/hyperic/util/exec/Execute.java @@ -345,7 +345,9 @@ public int execute() throws Exception { int exit= getExitValue(); if( log.isDebugEnabled() ) { - log.debug("Done exit=" + exit + " " + getCommandLineString()); + // ESC-572/HHQ-6050 Irena: to avoid print password in debug messages. + log.debug("Done exit="+ exit + getCommandLineString().replaceAll("(-P,? ?)([^ ,]+)", "$1******").replaceAll("(pass[^=]*=)(\\w*)", "$1******")); + //log.debug("Done exit=" + exit + " " + getCommandLineString()); } return exit; }