Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@
import java.util.Map;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;

public class LibvirtVMDef {
Expand DownExpand Up@@ -1764,7 +1764,7 @@ public String toString() {
graphicBuilder.append(" listen=''");
}
if (_passwd != null) {
graphicBuilder.append(" passwd='" + _passwd + "'");
graphicBuilder.append(" passwd='" + StringUtils.truncate(_passwd, 8) + "'");
} else if (_keyMap != null) {
graphicBuilder.append(" _keymap='" + _keyMap + "'");
}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,6 +60,7 @@
import org.apache.cloudstack.utils.linux.MemStat;
import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat;
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.Duration;
import org.junit.Assert;
import org.junit.Before;
Expand DownExpand Up@@ -773,7 +774,7 @@ private void verifyGraphicsDevices(VirtualMachineTO to, Document domainDoc, Stri
assertXpath(domainDoc, prefix + "/graphics/@type", "vnc");
assertXpath(domainDoc, prefix + "/graphics/@listen", to.getVncAddr());
assertXpath(domainDoc, prefix + "/graphics/@autoport", "yes");
assertXpath(domainDoc, prefix + "/graphics/@passwd", to.getVncPassword());
assertXpath(domainDoc, prefix + "/graphics/@passwd", StringUtils.truncate(to.getVncPassword(), 8));
}

private void verifySerialDevices(Document domainDoc, String prefix) {
Expand Down