B #3430: Do not return tainted key reference

If the element to be retrieved from the vCenter cache does not
have a reference, return nil, and not a tainted vCenter uuid reference

(cherry picked from commit 47675567a2)
This commit is contained in:
Tino Vazquez committed 2019-06-18 17:24:47 +02:00
1 parent 22ae31375b
commit d2076f1bce
1 file changed
+2
@@ -133,6 +133,8 @@ class VIHelper
def self.get_ref_key(element, attribute, vcenter_uuid = nil)
key = element[attribute]
return nil if key.nil?
tvid = element["TEMPLATE/VCENTER_INSTANCE_ID"]
uvid = element["USER_TEMPLATE/VCENTER_INSTANCE_ID"]