Skip to content

Commit dc6a365

Browse files
committed
Fix finder query in Msf::DBManager::Vuln
MSP-12152 * This is part of updating finder queries to be Rails 4 compatibile * In #find_vuln_by_details, pass in conditons hash crit rather than symbol :crit
1 parent 17437a3 commit dc6a365

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/db_manager/vuln.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ def find_vuln_by_details(details_map, host, service=nil)
3131
vuln = nil
3232

3333
if service
34-
vuln = service.vulns.includes(:vuln_details).where(:crit).first
34+
vuln = service.vulns.includes(:vuln_details).where(crit).first
3535
end
3636

3737
# Return if we matched based on service
3838
return vuln if vuln
3939

4040
# Prevent matches against other services
4141
crit["vulns.service_id"] = nil if service
42-
vuln = host.vulns.includes(:vuln_details).where(:crit).first
42+
vuln = host.vulns.includes(:vuln_details).where(crit).first
4343

4444
return vuln
4545
end

0 commit comments

Comments
 (0)