Skip to content

Commit d53067b

Browse files
committed
Fix ctype handling for body-less pages
rapid7#5515
1 parent ee9830e commit d53067b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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)