Skip to content

Commit ea4d135

Browse files
committed
Merge pull request rapid7#5587 from trevrosen/bug/MSP-12834/crawler-choke-on-save
MSP-12834 #land
2 parents cf04e72 + 4e3a2b2 commit ea4d135

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ GEM
124124
activesupport (>= 4.0.9, < 4.1.0)
125125
railties (>= 4.0.9, < 4.1.0)
126126
metasploit-payloads (1.0.3)
127-
metasploit_data_models (1.2.3)
127+
metasploit_data_models (1.2.5)
128128
activerecord (>= 4.0.9, < 4.1.0)
129129
activesupport (>= 4.0.9, < 4.1.0)
130130
arel-helpers
@@ -156,7 +156,7 @@ GEM
156156
coderay (~> 1.1.0)
157157
method_source (~> 0.8.1)
158158
slop (~> 3.4)
159-
rack (1.5.3)
159+
rack (1.5.5)
160160
rack-test (0.6.3)
161161
rack (>= 1.0)
162162
rails (4.0.13)

lib/msf/core/db_manager/web.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,16 @@ def report_web_page(opts)
142142
page.cookie = opts[:cookie] if opts[:cookie]
143143
page.auth = opts[:auth] if opts[:auth]
144144
page.mtime = opts[:mtime] if opts[:mtime]
145-
page.ctype = opts[:ctype] if opts[:ctype]
145+
146+
147+
if opts[:ctype].blank? || opts[:ctype] == [""]
148+
page.ctype = ""
149+
else
150+
page.ctype = opts[:ctype]
151+
end
152+
146153
page.location = opts[:location] if opts[:location]
154+
147155
msf_import_timestamps(opts, page)
148156
page.save!
149157

0 commit comments

Comments
 (0)