Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions lib/Catalyst/Authentication/Credential/Password.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ sub check_password {
my $password = $authinfo->{$self->_config->{'password_field'}};
my $storedpassword = $user->get($self->_config->{'password_field'});

if ($self->_config->{'password_type'} eq 'none') {
return 1;
} elsif ($self->_config->{'password_type'} eq 'clear') {
# FIXME - Should we warn in the $storedpassword undef case,
# as the user probably fluffed the config?
return unless defined $storedpassword;
return 1 if ($self->_config->{'password_type'} eq 'none');
return if (!defined $storedpassword);

if ($self->_config->{'password_type'} eq 'clear') {
return $password eq $storedpassword;
} elsif ($self->_config->{'password_type'} eq 'crypted') {
return $storedpassword eq crypt( $password, $storedpassword );
Expand Down