Repository navigation
🔒️ Only accept presence for the doc on its channel - #752
Draft
alecgibson wants to merge 1 commit into
Draft
alecgibson wants to merge 1 commit into
alecgibson wants to merge 1 commit into
Conversation
Fixes #738 At the moment, the server checks read access against a presence's `c` and `d`, but broadcasts it on its `ch`: 1. Deny `docs/secret` in `readSnapshots` 2. Send presence on `docs.secret` with the `c`/`d` of a readable doc 3. `docs/secret` subscribers apply it This change rejects doc presence whose `c` and `d` don't match its channel, and `DocPresence` ignores presence for any other doc, which also covers untyped presence and dotted-name channel collisions. Subscribing, write access and presence ID ownership are left to middleware, which the new "Access control" docs cover. The server check only holds once every instance is upgraded, and the client filter only protects upgraded clients. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This was referenced Oct 6, 2026
This branch has not been deployed
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.
Fixes #738
At the moment, the server checks read access against a presence's
candd, but broadcasts it on itsch:docs/secretinreadSnapshotsdocs.secretwith thec/dof a readable docdocs/secretsubscribers apply itThis change rejects doc presence whose
candddon't match its channel, andDocPresenceignores presence for any other doc, which also covers untyped presence and dotted-name channel collisions. Subscribing, write access and presence ID ownership are left to middleware, which the new "Access control" docs cover.The server check only holds once every instance is upgraded, and the client filter only protects upgraded clients.
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]