From d42841d80aa8eccd14dfde312bd8d00328de6d83 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 14 Sep 2025 05:02:50 +0000 Subject: [PATCH] fix: remove hardcode, reuse hasher --- app/controllers/api/users.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 95cf41ee09..b8874bf076 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1402,12 +1402,8 @@ App::patch('/v1/users/:userId/password') ->setAttribute('password', $newPassword) ->setAttribute('passwordHistory', $history) ->setAttribute('passwordUpdate', DateTime::now()) - ->setAttribute('hash', 'argon2') - ->setAttribute('hashOptions', [ - 'memoryCost' => 65536, - 'timeCost' => 4, - 'threads' => 3 - ]); + ->setAttribute('hash', $hasher->getName()) + ->setAttribute('hashOptions', $hasher->getOptions()); $user = $dbForProject->updateDocument('users', $user->getId(), $user);