Skip to content

Commit 680ca79

Browse files
committed
fix unmask vnc password log
1 parent 8831de3 commit 680ca79

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,9 +575,7 @@ String replaceIpForVNCInDescFileAndNormalizePassword(String xmlDesc, final Strin
575575
graphElem = graphElem.replaceAll("passwd='([^\\s]+)'", "passwd='" + vncPassword + "'");
576576
}
577577
xmlDesc = xmlDesc.replaceAll(GRAPHICS_ELEM_START + CONTENTS_WILDCARD + GRAPHICS_ELEM_END, graphElem);
578-
if (logger.isDebugEnabled()) {
579-
logger.debug(String.format("Replaced the VNC IP address [%s] with [%s] in VM [%s].", originalGraphElem, graphElem, vmName));
580-
}
578+
logger.debug("Replaced the VNC IP address {} with {} in VM {}.", maskSensitiveInfoInXML(originalGraphElem), maskSensitiveInfoInXML(graphElem), vmName);
581579
}
582580
}
583581
return xmlDesc;

0 commit comments

Comments
 (0)