1
0
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:
Pavel Czerný 2024-03-26 10:50:37 +01:00 committed by GitHub
parent c8f60926ae
commit be64cbdf04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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 )

View File

@ -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" )