Skip to content

Commit d207345

Browse files
committed
Land rapid7#4200 - report_note handling incorrect protocol names
2 parents 28135bc + 812aa9b commit d207345

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/msf/core/db_manager/note.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ def report_note(opts)
7575
if (opts[:port])
7676
proto = nil
7777
sname = nil
78-
case opts[:proto].to_s.downcase # Catch incorrect usages
78+
proto_lower = opts[:proto].to_s.downcase # Catch incorrect usages
79+
case proto_lower
7980
when 'tcp','udp'
80-
proto = opts[:proto]
81+
proto = proto_lower
8182
sname = opts[:sname] if opts[:sname]
8283
when 'dns','snmp','dhcp'
8384
proto = 'udp'
@@ -166,4 +167,4 @@ def report_note(opts)
166167
ret[:note] = note
167168
}
168169
end
169-
end
170+
end

0 commit comments

Comments
 (0)