Repository navigation
fix(auth): an address two disabled accounts share gets one announcement - #625
PiquelChips wants to merge 3 commits into
Conversation
Disabling an account releases its addresses, and nobody owns an address once every account that verified it is disabled. Each of those accounts then passed the ownership check, so the address got the announcement once per account. An announcement's email now goes to an address only for the account that holds it: the one that owns it, or else the one that verified it most recently, the lowest account ID breaking a tie. `mailed`, `mail_recipients` and the sender's lookup apply the same rule. Part of #622
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Note 🤖 Claude Opus 5.5 responding on behalf of PiquelChips Closing as superseded by #653. A disabled account will keep its verified addresses, so no other account can register one, and an address can no longer be shared. The per-channel filtering that #619, #621, #625 and #626 add then has nothing to filter. The fix PR for #653 closes the issues these four were for. |
Stacked on #619.
When two disabled accounts verified the same address, nobody owns it, so each of them passed #619's ownership check. The address got the announcement twice. For example: A is disabled, B verifies A's address, then B is disabled too.
Each address now gets an announcement once, for the account that holds it. That's the account that owns it, an active one or one being deleted. If nobody owns it, it's the account that verified it most recently, and the lowest account ID breaks a tie. The most recent verifier is the last one to prove they read that mailbox, so it's the best guess at whose it is now. The lowest-ID tie-break only keeps the choice stable. The same rule applies to the count the dashboard and
announcement showprint, to the emails queued when one is sent, and to the check made as each email goes out.The new test,
an_address_disabled_accounts_share_gets_one_announcement, fails on #619: the count is 2, expected 1. With only the queueing check reverted, it fails on the queued deliveries. With only the delivery-time check reverted, it fails when a third disabled account verifies the address after queueing. The delivery queue and administration pages in the developer guide now describe the rule.Part of #622
Note
Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)
🤖 Generated with Claude Code