We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9467297 + 559dfb5 commit 6191023Copy full SHA for 6191023
lib/nessus/nessus-xmlrpc.rb
@@ -253,9 +253,9 @@ def policy_list_hash
253
policies=Array.new
254
docxml.elements.each('/reply/contents/policies/policies/policy') { |policy|
255
entry=Hash.new
256
- entry['id']=policy.elements['policyID'].text
257
- entry['name']=policy.elements['policyName'].text
258
- 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']
259
policies.push(entry)
260
}
261
return policies
0 commit comments