Makes sure that Qualys reports only try to report sensible data -- fixes DB complaints about null in non-null contrained columns.

git-svn-id: file:///home/svn/framework3/trunk@9707 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2010-07-07 14:53:16 +00:00
parent ea0129ff35
commit 01c1d1d6df
1 changed files with 14 additions and 9 deletions

View File

@ -698,7 +698,7 @@ class DBManager
if opts[:port] and opts[:proto]
vuln.service = host.services.find_or_create_by_port_and_proto(opts[:port], opts[:proto])
elsif opts[:port]
vuln.service = host.services.find_or_create_by_port(opts[:port])
vuln.service = host.services.find_or_create_by_port_and_proto(opts[:port], "tcp")
end
if rids
@ -2755,17 +2755,22 @@ protected
info[:name] = name
end
report_service(info)
if info[:host] && info[:port] && info[:proto]
report_service(info)
end
return if qid == 0
report_vuln(
:workspace => wspace,
:host => addr,
:port => port,
:proto => protocol,
:name => 'QUALYS-' + qid,
:refs => refs)
if addr
report_vuln(
:workspace => wspace,
:host => addr,
:port => port,
:proto => protocol,
:name => 'QUALYS-' + qid,
:refs => refs
)
end
end
def process_nexpose_data_sxml_refs(vuln)