1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -436,6 +436,11 @@ int VirtualMachine::parse_graphics(string& error_str, Template * tmpl)
// Spice password must be 60 characters maximum
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
{
graphics->replace("PASSWD", password);