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:
parent
d80641ad2c
commit
2675a7f2f2
@ -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
|
||||
|
@ -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 )
|
||||
|
@ -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" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user