Repository navigation
fix: give token-less connections their own author (GHSA-746x-9w89-7xv6) - #8388
Conversation
A socket.io CLIENT_READY with neither the token cookie nor a legacy token resolved to a null token, which AuthorManager mapped to the shared `token2author:null` key. Every such client became the same author, so they could impersonate each other and act as the creator of any pad another token-less client created (delete it, change pad-wide settings). Generate a fresh per-session token when none is supplied, and make checkAccess do the same so HTTP callers (import) can't reach the shared key either. Reported by @MaBeFHDW. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4cYEvi9Y4BTPntnkV9tzh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4cYEvi9Y4BTPntnkV9tzh
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoIsolate authors for connections without tokens
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
The 3.3.10 release left develop at 3.3.9, so a patch release from develop would try to re-create 3.3.10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4cYEvi9Y4BTPntnkV9tzh
Code Review by Qodo
1.
|
Addresses Qodo review: getAuthorId hooks now still see a missing token as null, and checkAccess only resolves the author once access is granted, so a denied token-less request no longer creates an author. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4cYEvi9Y4BTPntnkV9tzh
A pad connection that sent CLIENT_READY with neither the token cookie nor a legacy token resolved its token to null, and AuthorManager mapped that to the shared
token2author:nullkey. Every such client was the same author, so they could impersonate each other and act as the creator of a pad another token-less client created (delete it, change pad-wide settings).A connection with no token now gets a fresh token for that session, and checkAccess does the same so HTTP callers (import) can't reach the shared key either. Includes the 3.3.11 CHANGELOG entry.
Tests: new
nullAuthorToken.tsbackend spec (fails on develop, passes here); full backend mocha 1875 passing, vitest 842 passing, tsc clean.Reported by @MaBeFHDW.
🤖 Generated with Claude Code
https://claude.ai/code/session_01V4cYEvi9Y4BTPntnkV9tzh