diff --git a/include/VirtualMachine.h b/include/VirtualMachine.h index cd3e44e020..1c35017680 100644 --- a/include/VirtualMachine.h +++ b/include/VirtualMachine.h @@ -142,7 +142,7 @@ public: }; static const int MAX_VNC_PASSWD_LENGTH = 8; - static const int MAX_SPICE_PASSWD_LENGTH = 60; + static const int MAX_SPICE_PASSWD_LENGTH = 59; /** * Functions to convert to/from string the VM states diff --git a/src/vm/VirtualMachineParser.cc b/src/vm/VirtualMachineParser.cc index ce23777e17..b59789a24b 100644 --- a/src/vm/VirtualMachineParser.cc +++ b/src/vm/VirtualMachineParser.cc @@ -433,7 +433,7 @@ int VirtualMachine::parse_graphics(string& error_str, Template * tmpl) if ( type == "spice" && password.size() > MAX_SPICE_PASSWD_LENGTH ) { - // Spice password must be 60 characters maximum + // Spice password must be 59 characters maximum graphics->replace("PASSWD", password.substr(0, MAX_SPICE_PASSWD_LENGTH)); } else if ( type == "vnc" && password.size() > MAX_VNC_PASSWD_LENGTH ) diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index 34d784066d..d411993f9d 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -1713,7 +1713,7 @@ int LibVirtDriver::deployment_description_kvm( if ( type == "spice" ) { - // Spice password must be 60 characters maximum + // Spice password must be 59 characters maximum passwd.resize(VirtualMachine::MAX_SPICE_PASSWD_LENGTH); } else if ( type == "vnc" )