Blank password being sent on user update
Whenever I go edit a user (for example, to remove a role), I get an error on Submit: "Invalid value type for field :USERS :PASSWORD. Expected type :PASSWORD, but got value NIL. [Guru Meditation Number 29a979-83c]"
Fixes:
1. valid-data (~line 1472) — Added a guard so valid-value-type is skipped
when the value is NIL and the field is either nullable (no :not-null t) or a
password field. Previously, NIL passwords were rejected here before reaching
downstream code that handles them correctly. This also fixes the general case of
any optional field receiving NIL.
2. rec (~line 1061) — Added a :blank-passwords keyword parameter (default
t). rec was blanking password hashes to NIL for all callers, including
be-update. When be-update fetched the existing record to preserve the
hash (on "no new password provided"), it got NIL instead, destroying the hash on
write. Now be-update passes :blank-passwords nil to get the real record; all
other callers (frontend-facing) keep the safe default.
Fixed in commit 9579111 Fix blank-passwords issue
- Slot
- 23700
- Status
- 60 Done
- Tags
- mvp, backend, frontend, bug
- Contributors
- Donnie