From 832db57171b3b4d376f0e10121012ca62801d25c Mon Sep 17 00:00:00 2001 From: Samuel Huckins Date: Sat, 20 Jul 2013 10:27:12 -0500 Subject: [PATCH] Removed requirement for note.data to be present. It wasn't required in the model or in specs, but was in db.rb, resulting in an error during certain import scenarios. --- lib/msf/core/db.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index a09a28f7f9..100dc0aeaa 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -1283,13 +1283,13 @@ class DBManager # Report a Note to the database. Notes can be tied to a ::Mdm::Workspace, Host, or Service. # # opts MUST contain - # +:data+:: whatever it is you're making a note of # +:type+:: The type of note, e.g. smb_peer_os # # opts can contain # +:workspace+:: the workspace to associate with this Note # +:host+:: an IP address or a Host object to associate with this Note # +:service+:: a Service object to associate with this Note + # +:data+:: whatever it is you're making a note of # +:port+:: along with +:host+ and +:proto+, a service to associate with this Note # +:proto+:: along with +:host+ and +:port+, a service to associate with this Note # +:update+:: what to do in case a similar Note exists, see below @@ -1369,7 +1369,7 @@ class DBManager end =end ntype = opts.delete(:type) || opts.delete(:ntype) || (raise RuntimeError, "A note :type or :ntype is required") - data = opts[:data] || (raise RuntimeError, "Note :data is required") + data = opts[:data] method = nil args = [] note = nil