From 6199f01f9d36eb6a0fc59e60d81af811441f0aca Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 17 Aug 2026 12:35:15 +0000 Subject: [PATCH] :bug: Fix update-profile-props not rejecting plugin props at validation The schema:props schema still included :plugins as a valid key, so the closed-map validation passed instead of rejecting it. The system-managed-props denylist only silently stripped the key after validation, never raised an error. Derive schema:props-writeable from schema:props using sm/dissoc-key to exclude system-managed keys, and use it in the update-profile-props params schema. The original schema:props remains intact for get-profile result validation. AI-assisted-by: mimo-v2.5 --- backend/src/app/rpc/commands/profile.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/profile.clj b/backend/src/app/rpc/commands/profile.clj index 8cde343655..fa3c50e60a 100644 --- a/backend/src/app/rpc/commands/profile.clj +++ b/backend/src/app/rpc/commands/profile.clj @@ -78,6 +78,10 @@ [:map-of {:gen/max 10} :keyword [:map-of :keyword :string]]] [:nudge {:optional true} schema:nudge]]) +(def schema:props-writeable + "Props schema for user-writable fields (excludes system-managed keys)." + (reduce sm/dissoc-key schema:props system-managed-props)) + (def schema:profile [:map {:title "Profile"} [:id ::sm/uuid] @@ -461,7 +465,7 @@ (def ^:private schema:update-profile-props [:map {:title "update-profile-props"} - [:props schema:props]]) + [:props schema:props-writeable]]) (defn update-profile-props [{:keys [::db/conn] :as cfg} profile-id props]