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 tracesbug/bundler_fix
parent
9a7d1b2390
commit
0d9fbe798a
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue