mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 22:22:43 -05:00
🐛 Fix repeated password update on login
because the default options were not being passed in the verification
This commit is contained in:
parent
e92ddee33a
commit
5c428b5aa5
1 changed files with 3 additions and 3 deletions
|
@ -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})))
|
||||
|
|
Loading…
Add table
Reference in a new issue