formatting

This commit is contained in:
Eldad Fux 2025-03-19 14:10:56 +01:00
parent 8c9123beaa
commit d6bd72cfd3
2 changed files with 2 additions and 2 deletions

View file

@ -3446,7 +3446,7 @@ App::put('/v1/account/recovery')
$hash = ProofsPassword::createHash($profile->getAttribute('hash'), $profile->getAttribute('hashOptions'));
$historyLimit = $project->getAttribute('auths', [])['passwordHistory'] ?? 0;
$history = $profile->getAttribute('passwordHistory', []);
if ($historyLimit > 0) {
$validator = new PasswordHistory($history, $hash);
if (!$validator->isValid($password)) {

View file

@ -1322,7 +1322,7 @@ App::patch('/v1/users/:userId/password')
$hash = ProofsPassword::createHash($user->getAttribute('hash'), $user->getAttribute('hashOptions'));
$historyLimit = $project->getAttribute('auths', [])['passwordHistory'] ?? 0;
$history = $user->getAttribute('passwordHistory', []);
if ($historyLimit > 0) {
$validator = new PasswordHistory($history, $hash);
if (!$validator->isValid($password)) {