fixes Issue #5272 on report_vuln

use includes instead of joins so that refs on
the vuln are not marked as readonly
bug/bundler_fix
David Maloney 2015-04-30 15:21:56 -05:00
parent cfc4dfb94f
commit 18874fe384
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ module Msf::DBManager::Vuln
def find_vuln_by_refs(refs, host, service=nil)
ref_ids = refs.find_all { |ref| ref.name.starts_with? 'CVE-'}
host.vulns.joins(:refs).where(service_id: service.try(:id), refs: { id: ref_ids}).first
host.vulns.includes(:refs).where(service_id: service.try(:id), refs: { id: ref_ids}).first
end
def get_vuln(wspace, host, service, name, data='')