Skip to content

Commit

Permalink
Merge pull request #13 from trqt/main
Browse files Browse the repository at this point in the history
fix: race condition in password reset
  • Loading branch information
LiviaLelis authored Aug 19, 2024
2 parents fed5b30 + a4d7b0e commit 480d2bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function recoveryPassword()
if ($user['User']['source'] == 1) {
$this->Session->setFlash(__('This account is registered with LinkedIn'));
} elseif ($user['User']['confirmed']) {
$hash = sha1(time() . Configure::read('Security.Salt'));
$hash = sha1(time() . Configure::read('Security.Salt') . $email);
$newPass = substr($hash, 0, 10);
$user['User']['password'] = $newPass;
$this->User->id = $email;
Expand Down

0 comments on commit 480d2bc

Please sign in to comment.