Skip to content

Commit fb4fde8

Browse files
authored
Land rapid7#19411, Fix RPC: check result is not nil before getting length
2 parents 2452fd5 + 9521563 commit fb4fde8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/rpc/v10/rpc_module.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def rpc_results(uuid)
539539
if r[:error]
540540
{"status" => "errored", "error" => r[:error]}
541541
else
542-
if r[:result].length == 1
542+
if r[:result] && r[:result].length == 1
543543
# A hash of one IP => result
544544
# TODO: make hashes of IP => result the normal case
545545
{"status" => "completed", "result" => r[:result].values.first}

0 commit comments

Comments
 (0)