mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 06:32:38 -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
|
(:require
|
||||||
[buddy.hashers :as hashers]))
|
[buddy.hashers :as hashers]))
|
||||||
|
|
||||||
(def default-params
|
(def ^:private default-options
|
||||||
{:alg :argon2id
|
{:alg :argon2id
|
||||||
:memory 32768 ;; 32 MiB
|
:memory 32768 ;; 32 MiB
|
||||||
:iterations 3
|
:iterations 3
|
||||||
|
@ -16,12 +16,12 @@
|
||||||
|
|
||||||
(defn derive-password
|
(defn derive-password
|
||||||
[password]
|
[password]
|
||||||
(hashers/derive password default-params))
|
(hashers/derive password default-options))
|
||||||
|
|
||||||
(defn verify-password
|
(defn verify-password
|
||||||
[attempt password]
|
[attempt password]
|
||||||
(try
|
(try
|
||||||
(hashers/verify attempt password)
|
(hashers/verify attempt password default-options)
|
||||||
(catch Throwable _
|
(catch Throwable _
|
||||||
{:update false
|
{:update false
|
||||||
:valid false})))
|
:valid false})))
|
||||||
|
|
Loading…
Add table
Reference in a new issue