Add workspace when reporting vuln_attempt
parent
aa40ef1789
commit
31be847213
|
@ -2,7 +2,7 @@ module VulnAttemptDataProxy
|
|||
|
||||
def vuln_attempts(opts)
|
||||
begin
|
||||
data_service = self.get_data_service()
|
||||
data_service = self.get_data_service
|
||||
data_service.vuln_attempts(opts)
|
||||
rescue Exception => e
|
||||
self.log_error(e, "Problem retrieving vulnerability attempts")
|
||||
|
@ -11,7 +11,8 @@ module VulnAttemptDataProxy
|
|||
|
||||
def report_vuln_attempt(vuln, opts)
|
||||
begin
|
||||
data_service = self.get_data_service()
|
||||
data_service = self.get_data_service
|
||||
add_opts_workspace(opts)
|
||||
data_service.report_vuln_attempt(vuln, opts)
|
||||
rescue Exception => e
|
||||
self.log_error(e, "Problem reporting vulnerability attempts")
|
||||
|
|
|
@ -34,7 +34,8 @@ module VulnAttemptServlet
|
|||
begin
|
||||
job = lambda { |opts|
|
||||
vuln_id = opts.delete(:vuln_id)
|
||||
vuln = get_db.vulns(id: vuln_id).first
|
||||
wspace = opts.delete(:workspace)
|
||||
vuln = get_db.vulns(id: vuln_id, workspace: wspace).first
|
||||
get_db.report_vuln_attempt(vuln, opts)
|
||||
}
|
||||
exec_report_job(request, &job)
|
||||
|
|
Loading…
Reference in New Issue