Cross-user isolation: 4 fixes + two-user leak suite (#409) #437
Loading…
Reference in a new issue
No description provided.
Delete branch "train/2026-10-15l"
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?
Audit half of #409: cross-user isolation. Findings and the sharing grill are posted on #409.
Fixes, each in its own commit with a regression test (verified to fail without the fix):
notes.restore/notes.forgetturned the client's id intoTrash/<id>.mdunchecked; an id with../reached another person's Home (restore moved their note into yours, forget deleted it). Ids are now checked before any path is built.preview./next.host, which SameSite=Lax still sends cookies to) was accepted by the API and the live websocket. Cookies now count only when there is noOriginheader or it is this server's own. Bearer tokens are unaffected. Needs--originto match the address people use (already true in prod and e2e).account.revokeof someone else's device id still signed that device out until restart.account.passkey-add-finishlet another person cancel your add-passkey prompt.Merge gate (ADR 0007):
crates/calternal/src/isolation.rs: Bob runs every action fromengine.actions()against Alice's ids and a random id; no answer may carry Alice's marker, and both must answer alike. New actions are covered without editing the test. Also a room-join check.crates/auth/tests/isolation.rs: two signed-in people (devices, passkeys, prompts, cookie origin).crates/calternal/src/app.rs: the server wiring moved out ofmainso it can be shared.Checks:
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace(412 passed, 0 failed).Refs #409
🤖 Generated with Claude Code
https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
(Replaces #419, merged with current dev. Review on #419.)