fix: harden RBAC access controls - #363
Merged
Merged
Conversation
Three security fixes: 1. Mod group handlers (groups_partial, new_group_card, save_groups) used Permission::ModsInstall instead of Permission::ConvoyManage — any user with mod install rights could manage convoy groups. 2. Profile and raid detail handlers had no ownership checks — any authenticated user could view any other user's profile, stash, quests, traders, hideout, and raid history. Now restricted to own data unless the user has UsersManage permission. 3. sync_builtin_role_permissions only synced admin role on upgrade, leaving moderator without permissions added in later migrations (items.give, mods.config_edit, notes.edit). Extended to sync moderator with its expected permission set. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
groups_partial,new_group_card,save_groupsusedPermission::ModsInstallinstead ofPermission::ConvoyManage— privilege downgrade allowing any mod installer to manage convoy groupsUsersManagepermission. Server-wide stats/leaderboard pages remain accessible to all authenticated users (by design).sync_builtin_role_permissionsnow covers the moderator role, ensuring permissions added in later migrations (items.give,mods.config_edit,notes.edit) are granted on upgradeTest plan
-D warningsrequire_self_or_admin_allows_own_data,require_self_or_admin_allows_users_managesync_adds_new_moderator_permissionsmoderator_permissionstest tightened to assert exact permission setImplemented with the help of Claude Code