Fixed getting the policy_hash_list which can fail if elements are null
[SeeRM #89297]
bug/bundler_fix
Nicholas Davis 2013-08-18 14:49:44 -07:00
parent 9467297bf7
commit 559dfb5a7e
1 changed files with 3 additions and 3 deletions

View File

@ -253,9 +253,9 @@ module NessusXMLRPC
policies=Array.new
docxml.elements.each('/reply/contents/policies/policies/policy') { |policy|
entry=Hash.new
entry['id']=policy.elements['policyID'].text
entry['name']=policy.elements['policyName'].text
entry['comment']=policy.elements['policyComments'].text
entry['id']=policy.elements['policyID'].text if policy.elements['policyID']
entry['name']=policy.elements['policyName'].text if policy.elements['policyName']
entry['comment']=policy.elements['policyComments'].text if policy.elements['policyComments']
policies.push(entry)
}
return policies