mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-08 21:17:43 +03:00
B OpenNebula/one#6530: Fix max SPICE passwd length (#3009)
This commit is contained in:
parent
c8f60926ae
commit
be64cbdf04
@ -145,7 +145,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
|
||||
|
@ -439,7 +439,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 )
|
||||
|
@ -1927,7 +1927,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" )
|
||||
|
Loading…
Reference in New Issue
Block a user