From 29ef9f752ac3c49d1f14e5a234e99dcdd537d2d1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 23 May 2024 14:42:28 +0200 Subject: [PATCH] :bug: Fix incorrect password encoding on create-profile manage command --- backend/src/app/srepl/cli.clj | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/src/app/srepl/cli.clj b/backend/src/app/srepl/cli.clj index d461ef14c..0cfa43ed2 100644 --- a/backend/src/app/srepl/cli.clj +++ b/backend/src/app/srepl/cli.clj @@ -12,6 +12,7 @@ [app.common.uuid :as uuid] [app.db :as db] [app.rpc.commands.auth :as cmd.auth] + [app.rpc.commands.profile :as cmd.profile] [app.util.json :as json] [app.util.time :as dt] [cuerdas.core :as str])) @@ -37,12 +38,13 @@ :or {is-active true}}] (when-let [system (get-current-system)] (db/with-atomic [conn (:app.db/pool system)] - (let [params {:id (uuid/next) - :email email - :fullname fullname - :is-active is-active - :password password - :props {}}] + (let [password (cmd.profile/derive-password system password) + params {:id (uuid/next) + :email email + :fullname fullname + :is-active is-active + :password password + :props {}}] (->> (cmd.auth/create-profile! conn params) (cmd.auth/create-profile-rels! conn))))))