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.
1 parent 9467297 commit 559dfb5Copy full SHA for 559dfb5
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