fix(admin): reject unknown roles in the user-role change handler (BUNYIP-114) #153
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-114-role-enum-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
user_role forwarded f.role verbatim to the API with no enum check, so a crafted request could submit an arbitrary role string. Accept only the known roles (admin / subscriber) and redirect without calling the API otherwise.
Verified with a targeted in-container fmt + clippy on bunyip-web (TARGETED_EXIT=0). The full just check-container OOMs locally on the unrelated async-stripe dependency; Forgejo CI builds the workspace cleanly.
Fixes BUNYIP-114.