From 07603ad74ea21f722ef7184f200b04ff6e75b30e Mon Sep 17 00:00:00 2001 From: Toby Crawley Date: Tue, 17 Oct 2023 07:25:09 -0400 Subject: [PATCH] Properly detect password changes We were sending a password change email when just the email address was updated, due to getting an empty string as the new password. --- src/clojars/web/user.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clojars/web/user.clj b/src/clojars/web/user.clj index 9d3625c0..09525544 100644 --- a/src/clojars/web/user.clj +++ b/src/clojars/web/user.clj @@ -142,7 +142,7 @@ (profile-form account params nil (apply concat (vals errors)))) (let [old-email (:email (find-user-by-user-or-email db account)) email-changed? (not= old-email email) - password-changed? (some? password)] + password-changed? (seq password)] (update-user db account email account password) (log/info {:status :success}) (when email-changed?