Skip to content

Commit e54442a

Browse files
committed
Fix rapid7#4089 - undefined method `downcase' for nil:NilClass
1 parent 71a96f2 commit e54442a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rex/proto/smb/simpleclient.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def login(name = '', user = '', pass = '', domain = '',
6666

6767
self.client.spnopt = spnopt
6868

69+
# In case the user unsets the password option, we make sure this is
70+
# always a string
71+
pass ||= ''
72+
6973
ok = self.client.session_setup(user, pass, domain)
7074
rescue ::Interrupt
7175
raise $!

0 commit comments

Comments
 (0)