From 18874fe384e17ac00d99d8787683cdedd1c6e848 Mon Sep 17 00:00:00 2001 From: David Maloney Date: Thu, 30 Apr 2015 15:21:56 -0500 Subject: [PATCH] fixes Issue #5272 on report_vuln use includes instead of joins so that refs on the vuln are not marked as readonly --- lib/msf/core/db_manager/vuln.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/db_manager/vuln.rb b/lib/msf/core/db_manager/vuln.rb index 24ad02bbc0..8251f3ff10 100644 --- a/lib/msf/core/db_manager/vuln.rb +++ b/lib/msf/core/db_manager/vuln.rb @@ -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='')