Repository navigation
fix(relay): enforce connected-client ownership before command dispatch - #176
Merged
Merged
Conversation
skhaz
approved these changes
Oct 12, 2026
Merged
This was referenced Oct 14, 2026
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.
Defect
During websocket connection transfer, a command reaching central can be forwarded to every user hub. Previously, those hubs accepted ws.message without checking sender membership, allowing a plugin to run under another user's actor and grants.
Fix and compatibility
Reject an unconnected sender before JSON decoding or plugin resolution, using the hub's existing connected_clients map. Preserve #165's payload validation, route cache, idempotent JOIN handling and restored membership count. Normal joined-client IDs, payloads and snapshot storage remain unchanged. Commands before JOIN, after LEAVE or from a foreign connection are intentionally rejected.
The documentation now states the welcome/readiness boundary and existing live-update options. No process.set_options field is introduced: central and user hubs already use trap_links=true and upgradable=true.
Tests
Companion runtime fix
The native transport must preserve JOIN-before-command and command-before-LEAVE ordering. Runtime PR wippyai/runtime#964 provides that ordering without host configuration or process-option changes. Deploy that fix before rolling out this relay module.
This head merges current master to resolve the #165 conflicts. CI and Rodrigo review are still required; nothing has been released.