1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B OpenNebula/one#6530: Fix max SPICE passwd length (#3009)

(cherry picked from commit be64cbdf0404a7a78aedaed75b5f2d97a30be8a9)
This commit is contained in:
Pavel Czerný 2024-03-26 10:50:37 +01:00 committed by Ruben S. Montero
parent d80641ad2c
commit 2675a7f2f2
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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