From d6bd72cfd32635d37ff144d54ee079bbcda72ad5 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 19 Mar 2025 14:10:56 +0100 Subject: [PATCH] formatting --- app/controllers/api/account.php | 2 +- app/controllers/api/users.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 51a1c4f101..74ad74b3db 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -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)) { diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 65a35d616a..0ab7f1a9d7 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -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)) {