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

Bug #3766: Do not encrypt vCenter password if over 22 characters

This commit is contained in:
Tino Vazquez 2015-06-19 16:38:58 +02:00
parent eed80348d6
commit 101d015ad2

View File

@ -704,10 +704,12 @@ int Host::post_update_template(string& error)
string new_vm_mad;
string new_vn_mad;
erase_template_attribute("VCENTER_PASSWORD", vcenter_password);
get_template_attribute("VCENTER_PASSWORD", vcenter_password);
if (!vcenter_password.empty())
if (!vcenter_password.empty() && vcenter_password.size() <= 22)
{
erase_template_attribute("VCENTER_PASSWORD", vcenter_password);
Nebula& nd = Nebula::instance();
string one_key;
string * encrypted;