From 5c428b5aa507cff8c3666a7c565c2e0d688c7476 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 14 Jan 2025 17:41:28 +0100 Subject: [PATCH] :bug: Fix repeated password update on login because the default options were not being passed in the verification --- backend/src/app/auth.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/app/auth.clj b/backend/src/app/auth.clj index fc6d254810..271e52e024 100644 --- a/backend/src/app/auth.clj +++ b/backend/src/app/auth.clj @@ -8,7 +8,7 @@ (:require [buddy.hashers :as hashers])) -(def default-params +(def ^:private default-options {:alg :argon2id :memory 32768 ;; 32 MiB :iterations 3 @@ -16,12 +16,12 @@ (defn derive-password [password] - (hashers/derive password default-params)) + (hashers/derive password default-options)) (defn verify-password [attempt password] (try - (hashers/verify attempt password) + (hashers/verify attempt password default-options) (catch Throwable _ {:update false :valid false})))