Skip to content

feat: refuse pairing receives during a login and log out a failed receive's login - #8158

Open
alexjba wants to merge 1 commit into
feat/23323-reencryption-restartfrom
feat/23323-pairing-login
Open

alexjba wants to merge 1 commit into
feat/23323-reencryption-restartfrom
feat/23323-pairing-login

Conversation

@alexjba

@alexjba alexjba commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What:

  • The pairing receiver entry points are refused during a login or a teardown.
  • A failed receive logs out its own login.

Why:

  • A receiver applies sync data to the active account, which would belong to the other login.
  • A pairing login sends no node.login, so a session it leaves behind would never be seen to finish.

How:

  • CheckPairingReceive runs in the three receiver entry points.
  • EndPairingLogin(seqBefore) logs out only a login the receiver started after seqBefore.

Test: login_state_pairing_test.go, mobile/login_state_pairing_test.go.

Stack: #8157 ← #8158 (top, the app pin). Needs #8156's orphan gate, not #8157.

🤖 Generated with Claude Code

A local pairing receiver opens databases and applies sync data to the active
account. The receiver entry points now refuse with "a login is already in
progress" while a login is in progress or a logged out login still tears
down, saving nothing.

A pairing login sends no node.login, so a receive that fails after logging
in would leave a session nobody sees finish: EndPairingLogin logs out the
receiver's own login and keeps any other session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant