turn nil publics and privates into blanks

don't pass nil into the credential object, pass an empty string instead
this is the expected behaviour and avoids stack traces
bug/bundler_fix
David Maloney 2014-09-05 16:06:58 -05:00
parent 9a7d1b2390
commit 0d9fbe798a
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@ module Metasploit::Credential::Core::ToCredential
def to_credential
Metasploit::Framework::Credential.new(
public: public.try(:username),
private: private.try(:data),
public: public.try(:username) || '',
private: private.try(:data) || '',
private_type: private.try(:type).try(:demodulize).try(:underscore).try(:to_sym),
realm: realm.try(:value),
realm_key: realm.try(:key),