Quick fix to avoid dying on badly formatted imported data (looks like a Nessus import problem, actually)
git-svn-id: file:///home/svn/framework3/trunk@10499 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
ea128c6404
commit
dc79d360ac
|
@ -1927,7 +1927,14 @@ class DBManager
|
|||
vuln_data[:workspace] = wspace
|
||||
vuln_data[:host] = host_address
|
||||
if vuln.elements["info"].text
|
||||
vuln_data[:info] = YAML.load(vuln.elements["info"].text.to_s.strip)
|
||||
info = vuln.elements["info"].text.to_s.strip
|
||||
begin
|
||||
vuln_data[:info] = YAML.load(info)
|
||||
rescue ::Exception # Oops, badly formed info.
|
||||
dlog("Badly formatted vuln.info data from #{host_address} : '#{info}'")
|
||||
vuln_data[:info] = nil
|
||||
next
|
||||
end
|
||||
end
|
||||
vuln_data[:name] = vuln.elements["name"].text.to_s.strip
|
||||
%w{created-at updated-at}.each { |datum|
|
||||
|
|
Loading…
Reference in New Issue