mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
⬆️ Adapt some changes to latest version of buddy-hashers.
This commit is contained in:
parent
d80c1f2bfb
commit
bdefe0d04e
2 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
buddy/buddy-core {:mvn/version "1.8.0"}
|
buddy/buddy-core {:mvn/version "1.8.0"}
|
||||||
buddy/buddy-hashers {:mvn/version "1.5.1"}
|
buddy/buddy-hashers {:mvn/version "1.6.0"}
|
||||||
|
|
||||||
lambdaisland/uri {:mvn/version "1.4.54"
|
lambdaisland/uri {:mvn/version "1.4.54"
|
||||||
:exclusions [org.clojure/data.json]}
|
:exclusions [org.clojure/data.json]}
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
|
|
||||||
(defn- verify-password
|
(defn- verify-password
|
||||||
[attempt password]
|
[attempt password]
|
||||||
(hashers/check attempt password))
|
(hashers/verify attempt password))
|
||||||
|
|
||||||
(defn- create-profile
|
(defn- create-profile
|
||||||
"Create the profile entry on the database with limited input
|
"Create the profile entry on the database with limited input
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
(when (= (:password profile) "!")
|
(when (= (:password profile) "!")
|
||||||
(ex/raise :type :validation
|
(ex/raise :type :validation
|
||||||
:code ::account-without-password))
|
:code ::account-without-password))
|
||||||
(verify-password password (:password profile)))
|
(:valid (verify-password password (:password profile))))
|
||||||
|
|
||||||
(validate-profile [profile]
|
(validate-profile [profile]
|
||||||
(when-not profile
|
(when-not profile
|
||||||
|
@ -249,7 +249,7 @@
|
||||||
(defn- validate-password!
|
(defn- validate-password!
|
||||||
[conn {:keys [profile-id old-password] :as params}]
|
[conn {:keys [profile-id old-password] :as params}]
|
||||||
(let [profile (profile/retrieve-profile-data conn profile-id)]
|
(let [profile (profile/retrieve-profile-data conn profile-id)]
|
||||||
(when-not (verify-password old-password (:password profile))
|
(when-not (:valid (verify-password old-password (:password profile)))
|
||||||
(ex/raise :type :validation
|
(ex/raise :type :validation
|
||||||
:code ::old-password-not-match))))
|
:code ::old-password-not-match))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue