diff --git a/backend/deps.edn b/backend/deps.edn index 2abd02f29..79575ad0d 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -39,7 +39,7 @@ 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" :exclusions [org.clojure/data.json]} diff --git a/backend/src/app/services/mutations/profile.clj b/backend/src/app/services/mutations/profile.clj index 480410a02..117cbf40d 100644 --- a/backend/src/app/services/mutations/profile.clj +++ b/backend/src/app/services/mutations/profile.clj @@ -113,7 +113,7 @@ (defn- verify-password [attempt password] - (hashers/check attempt password)) + (hashers/verify attempt password)) (defn- create-profile "Create the profile entry on the database with limited input @@ -166,7 +166,7 @@ (when (= (:password profile) "!") (ex/raise :type :validation :code ::account-without-password)) - (verify-password password (:password profile))) + (:valid (verify-password password (:password profile)))) (validate-profile [profile] (when-not profile @@ -249,7 +249,7 @@ (defn- validate-password! [conn {:keys [profile-id old-password] :as params}] (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 :code ::old-password-not-match))))