fix(perms): never write a never-seen player into Carbon's shared blank record #47
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/carbon-blank-user"
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?
The bug (W3 from the account deletion walk, docs#397). In Carbon 2.0.262,
GetUserData(id)for a Steam id Carbon has no record for returns one shared, static blank record, andGrantUserPermissionandAddUserGroupwrite into whatever it returns (CarbonPermissions.cs,_blankUser). So when the site granted something to a player who had never joined a Carbon server:UserHasGroupreads the same blank record, so the membership read back as a success. The sync reported it as applied, and later syncs saw nothing to fix.notLanded, becauseGetPermissionUserslists only real records, but it had still leaked.Oxide creates a real record in
GetUserData, so this is Carbon-only.The fix. On Carbon, the sync checks
permission.UserExistsbefore either write (HasNoCarbonRecord). A never-seen player's grant is reportednotLandedand their membershippending, and the store is not touched. Both land at the first audit sync after the player joins, which is what PLAN.md §29.8 and §12.2 rule 4 already describe. Oxide is unchanged, and the source is still the same file on both frameworks (it uses the existingIsCarbon(), not#if CARBON). The org lead chose "hold until they join" over creating the record. The change is 36 added lines inRunicGateway.cs, with no protocol or message-shape change.Proven on the Carbon rig (Rust 26139947, Carbon 2.0.262), with a throwaway probe plugin that asks the store about random Steam ids it has never seen:
autodoors.usenotLanded: [043:autodoors.use]andpending: [043:w3vip]The rig was put back on the released 0.3.0 afterwards, and the probe and test data were removed. The docs correction to PLAN.md §29.8 is in a separate docs PR.
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY