mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7823] [MERGED] fix(multiplayer): give each seat a private rejoin key #7949
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7949
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7823
Author: @SpicyMarinara
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/harden-multiplayer-rejoin📝 Commits (1)
2d013d1fix(multiplayer): give each seat a private rejoin key📊 Changes
4 files changed (+332 additions, -16 deletions)
View changed files
📝
docs/TROUBLESHOOTING.md(+1 -1)📝
docs/development/multiplayer.md(+9 -0)📝
packages/server/src/services/multiplayer/service.ts(+51 -15)➕
scripts/regressions/multiplayer-seat-key-security.regression.ts(+271 -0)📄 Description
Linked issue
No public issue: this is a hardening follow-up from an internal multiplayer review.
Why this change
What changed
timingSafeEqual). Without the key, a request with the same names is refused with the existing name-conflict error, and the real player's sessions are left alone. Kick and Stop drop the seat's key.Authorizationbearer on every request. Engines from v2.5.0 keep working in both directions:docs/TROUBLESHOOTING.mdanddocs/development/multiplayer.md.multiplayer-seat-key-securityregression. It runs over real TLS between two Engines and covers four cases: a request with copied names and no key is refused and gets no history or whispers; a made-up key is refused; the real player rejoins with the key and gets the same seat and the same whispers; the key and its hash never appear in another player's poll, the host's views or stored chats on either Engine. It fails onstagingwithout this change (Missing expected rejection: copied names do not take Lyra's seat) and passes with it.Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent on this branch:
pnpm check: passed (exit 0). ESLint reports one existingreact-hooks/exhaustive-depswarning in client code this PR does not touch.pnpm regression:security: 22/24 passed in the suite run, including the new regression. Two files hit the runner's 30-second limit while the machine was under heavy load (load average about 50):encoded-api-path-securitypassed on its own (10.6 s).multiplayer-control-securitypassed when run directly (54-59 s); onstaging'sservice.tsunder the same load it took 76 s, and it passed in 21.6 s in the earlier multiplayer run. The remaining filters (runtime-integrity,shell-sandbox,extension-ipc,android-local-auth,docker-proxy-auth) all passed.node ./scripts/run-regressions.mjs --filter multiplayer: 14/14 passed (all multiplayer regressions, including the unchangedmultiplayer-session-lifecyclereturning-player cases)node ./scripts/run-regressions.mjs --filter multiplayer-seat-keyonstaging'sservice.tsfails as described above, and passes with this change.Manual verification notes
MULTIPLAYER_ENABLED=true, Multiplayer turned on): host a Roleplay room, join as a guest, have the AI whisper to the guest, leave and join again with the same names, and approve the request. Check that the guest gets the same seat and still sees the whisper.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)English docs changed:
docs/TROUBLESHOOTING.md(Disconnected bullet) anddocs/development/multiplayer.md(recovery section and verification record). The release translation sweep picks these up.UI evidence (if applicable)
No UI changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.