Skip to content

Commit

Permalink
Land #19411, Fix RPC: check result is not nil before getting length
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 authored Aug 23, 2024
2 parents 2452fd5 + 9521563 commit fb4fde8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/msf/core/rpc/v10/rpc_module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def rpc_results(uuid)
if r[:error]
{"status" => "errored", "error" => r[:error]}
else
if r[:result].length == 1
if r[:result] && r[:result].length == 1
# A hash of one IP => result
# TODO: make hashes of IP => result the normal case
{"status" => "completed", "result" => r[:result].values.first}
Expand Down

0 comments on commit fb4fde8

Please sign in to comment.