Watch
0
0
Fork
You've already forked hyperhive
0

revoking a linked Matrix account also deletes its key-backup passphrase; a plain unlink keeps it for a relink

This commit is contained in:
maia 2026-11-16 22:21:20 +01:00 • committed by mara
commit 6b3e1f0fb2
2 changed files with 287 additions and 16 deletions

View file

@ -46,5 +46,14 @@ logout fails because the homeserver no longer recognises the token, the delete
goes ahead as if it had worked. Any other failed logout, or an account with no
homeserver stored, leaves the account in place and the dialog says why.
The checkbox also decides what happens to the account's key-backup passphrase,
the secret its end-to-end key backup opens with. With it off, the passphrase
stays, so linking the same account again finds the passphrase its backup was
enabled with and the agent can recover its keys. With it on, the passphrase is
deleted after the account, and a later link gets a new one, which cannot open a
backup made with the old one. Tick it when the account is gone for good. If the
passphrase can't be deleted, the account is already gone and the dialog says
so; deleting the account again with the box ticked finishes the job.
The agent isn't told about a delete. Its matrix daemon drops the account the
next time it lists the accounts, within two minutes.

View file

@ -173,6 +173,12 @@ registration's `as_token`, and `swarm-controller` reads it from there.
primary-token reset therefore comes back with its history. With no passphrase
stored yet the account comes up without backup and picks it up on the
next daemon start. A failure is a `WARN` and never stops the daemon.
The passphrase outlives a plain unlink, so a relink reuses it. A revoking
unlink (`?revoke=true`, after the logout succeeded) deletes it too, every
version, after the account's own entry; when that last delete fails the route
answers 500 with the account already gone, and sending the revoking delete
again finishes it (the controller's `delete` grant on
`metadata/swarm/agents/+/matrix-recovery/+`).
The module's retired hive-side code, its evaluation assertions and the
fluffychat-web build fixes are in the