adds check for empty data b4 sending to parser [RM7269]
[fixes RM7269] we discussed the solution to this bug a lot on IRC and in the ticket itself, the consensus was to fix it as far upstream as possible before sending to the parsers so as to avoid any future bugs of the same nature, so this commit adds a check to import_nmap_xml to see if the data is empty before passing it on to the parser, whether that parser is nokogiri or the legacy parser. db_nmap -h now produces the expected output and db_nmap still works as expected.bug/bundler_fix
parent
4fd4af1f43
commit
7090a4a82f
|
@ -4869,6 +4869,7 @@ class DBManager
|
|||
# If you have Nokogiri installed, you'll be shunted over to
|
||||
# that. Otherwise, you'll hit the old NmapXMLStreamParser.
|
||||
def import_nmap_xml(args={}, &block)
|
||||
return nil if args[:data].empty?
|
||||
wspace = args[:wspace] || workspace
|
||||
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
|
||||
|
||||
|
|
Loading…
Reference in New Issue