Skip to content

Commit a13cd2b

Browse files
author
Brent Cook
committed
Land rapid7#4880: @wchen-r7 check if module has session before comparison
2 parents 2134cc3 + 31191be commit a13cd2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/payload_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def find_payload(platform, arch, handler, session, payload_type)
236236
next if (handler and not p.handler_klass.ancestors.include?(handler))
237237

238238
# Check to see if the session classes match.
239-
next if (session and not p.session.ancestors.include?(session))
239+
next if (session and p.session and not p.session.ancestors.include?(session))
240240

241241
# Check for matching payload types
242242
next if (payload_type and p.payload_type != payload_type)

0 commit comments

Comments
 (0)