Name the address the code was sent to - #215
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
seyfahni
approved these changes
Sep 4, 2026
The login screen said that a code had been sent, but not where to. A user who receives nothing then cannot tell whether the account carries the right address at all. It now shows the same masked form the personal settings use. The address goes inside the two existing sentences rather than on a line of its own. A line of its own would state the same fact twice, and as a bare fragment it gives a translator no subject and no verb to make the address agree with; several languages need it inside the sentence to inflect it at all. Each sentence therefore has a second variant that names the address, so what a translator sees is always a whole sentence. The smoke test pins both halves of the result: the masked form is on the page, and the user's full address is not. Without the second, a refactor that handed the template the raw address would pass CI in silence. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Olav Seyfarth <olav@seyfarth.de>
The masker returned anything it could not parse unchanged, which was harmless while only the settings used it and is not now that the login screen shows the result. A quoted local part may hold a space or a second '@' and is delivered normally, and an address written through occ passes no validation at all, so either could have been readable in full on the screen that promises a mask. Such a value is now hidden whole, as IEMailAddressMasker::HIDDEN. That mask names no address, so putting it on the screen would leave the user with "sent to *@*" — nothing, in exactly the case where naming the address was meant to reassure them. Both screens that show the address therefore ask for the mask through one method, which turns HIDDEN into the empty string: the login challenge and the enrolment step during login. The empty string is what already told them there is nothing to name, so a single guard on each screen covers both "no address at all" and "an address we cannot name", and the two cannot drift apart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Olav Seyfarth <olav@seyfarth.de>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Olav Seyfarth <olav@seyfarth.de>
nursoda
force-pushed
the
feature/name-the-masked-address
branch
from
September 4, 2026 22:58
0cb8309 to
5a391be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The login challenge said that a code had been sent, but not where to. A user who
receives nothing could not tell whether the account carries the right address at
all — the one question the screen has to answer before anyone reaches for their
mailbox. It now names the address in the same masked form the personal settings
use:
a*@*.org.The address sits inside the two existing sentences rather than on a line of its
own. A separate line would state the same fact twice, and as a bare fragment it
gives a translator no subject and no verb to make the address agree with; several
languages need it inside the sentence to inflect it at all.
Showing the address made a second thing urgent.
EMailAddressMaskerused toreturn anything it could not parse unchanged — harmless while only the
settings read it, a disclosure once a login screen prints it. An address whose local part is quoted —
"jo hn"@example.org, which the standard allows — may hold a space or a second@and is delivered normally, and an address writtenthrough
occpasses no validation at all. Such a value is now hidden whole. Theplaceholder for it names no address, so both screens that show one — the login
challenge and the enrolment step — turn it into the empty string and use the
wording that names no address instead.
Translations lag behind, on purpose
Three strings are new: the two sentences that name the address, and the
enrolment screen's variant without one (
Codes will be sent to your primary email address., with a full stop where the existing one has a colon). Until Transifex hasthem, a non-English instance renders them in English while every other string
stays translated — including the fallback sentences, which are unchanged and keep
their existing translations. This is the normal case, not an edge case, so expect
it to be visible.
The l10n bot runs almost daily, but it only sees strings that reached
main.Merging a few days before a release rather than on the day of it is what closes
this; there is nothing to fix in the code.
Not to be merged alone
Once the page names the address, a code that stays valid across an address change
would make that line name the wrong mailbox.
security/drop-the-code-when-the-address-changesis what closes that. Merge it first, or both together.
Checked
tests/smoke/smoke.sh)reload, an address the mask cannot take apart, and no address at all
exactly those two turned, and nothing else
🤖 Generated with Claude Code, verified, tweaked and approved by @nursoda.