Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Commit

Permalink
Fix: Store hashed password after password reset.
Browse files Browse the repository at this point in the history
Fixes #40
  • Loading branch information
vikin91 committed May 1, 2019
1 parent 3e1823a commit ac6700a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/BibSpace/Controller/Login.pm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ sub promote_to_rank {
my $rank = shift;

my $profile_id = $self->param('id');
my $user_obj = $self->app->repo->users_find(sub { $_->id == $profile_id });
my $user_obj = $self->app->repo->users_find(sub { $_->id == $profile_id });

my $me
= $self->app->repo->users_find(sub { $_->login eq $self->session('user') });
Expand Down Expand Up @@ -319,9 +319,9 @@ sub store_password {

if ($pass1 eq $pass2 and check_password_policy($pass1)) {

my $salt = salt();
my $hash = encrypt_password($pass1, $salt);
$user->pass($pass1);
my $salt = salt();
my $password_hash = encrypt_password($pass1, $salt);
$user->pass($password_hash);
$user->pass2($salt);
$user->forgot_token("");
$self->flash(
Expand Down

0 comments on commit ac6700a

Please sign in to comment.