1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-08-29 09:49:28 +03:00

F #5842: limit VNC password length to 8 symbols (#2333)

This commit is contained in:
Victor Palma
2022-11-13 20:04:38 +01:00
committed by GitHub
parent 60d0f49549
commit 24df1b4772

View File

@ -436,6 +436,11 @@ int VirtualMachine::parse_graphics(string& error_str, Template * tmpl)
// Spice password must be 60 characters maximum // Spice password must be 60 characters maximum
graphics->replace("PASSWD", password.substr(0, 59)); graphics->replace("PASSWD", password.substr(0, 59));
} }
else if ( graphics->vector_value("TYPE") == "vnc" )
{
// Vnc password must be 8 characters maximum
graphics->replace("PASSWD", password.substr(0, 7));
}
else else
{ {
graphics->replace("PASSWD", password); graphics->replace("PASSWD", password);