Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ESC-572/HHQ-6050 : Print *** instead of passwords.
  • Loading branch information
Irena Goverdovsky committed Jul 6, 2015
1 parent 8e97b94 commit 485ff32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hq-util/src/main/java/org/hyperic/util/exec/Execute.java
Expand Up @@ -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;
}
Expand Down

0 comments on commit 485ff32

Please sign in to comment.