feat(app): an authenticator's key copied, marked sensitive, and its code six digits

A phone without a camera whose authenticator doesn't open otpauth: had no
way but typing the key. It is copied again, the key alone (ADR 0017
amended, the developer's decision of 3 Nov 2026): on Android through each
app's SensitiveClipboard.kt, marked EXTRA_IS_SENSITIVE, so Gboard and the
system show no preview and keep it out of their histories; elsewhere through
Flutter's clipboard. Emptied 60 seconds later if the clipboard still holds
it. The recovery phrase and codes stay never copied.

The code's field counted "/7", taking an optional space for a seventh
character: it now takes six digits alone, a pasted space dropped, and counts
nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-03 22:07:35 +01:00
commit 8c70ad98a1
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -584,6 +584,17 @@ keychain on 21 Oct; the 30-day grace for GitHub-only accounts was proposed and k
- **The clipboard (medium):** copies reached clipboard histories and cloud clipboards,
and Android often couldn't empty it again. Nothing secret is copied any more: codes
are saved, like the phrase; an authenticator's key is scanned, opened or typed.
*Amended 3 Nov 2026 (the developer):* a phone without a camera whose authenticator
doesn't open `otpauth:` had no way but typing, so the key alone is copied again
(`PlatformSecretClipboard`): on Android through each app's `SensitiveClipboard.kt`,
marked `EXTRA_IS_SENSITIVE` (no preview, kept out of Gboard's and the system's
histories); elsewhere through Flutter's clipboard, which has no mark (Windows' and
KDE's histories may keep it). Either way emptied 60 seconds later if it still holds
the key, which Android allows only while the app is in front. Alternatives weighed:
phones only (the desktop stays type-only), and keeping it uncopyable with the key in
groups of four. The phrase and the recovery codes stay never copied. The code's
field takes six digits alone, a pasted space dropped, without a counter (it read
"/7", taking the space as a seventh).
- **Saving (medium-low):** a saved file was made, then set to 0600, and written into
whatever the path held. Now a new file beside it, 0600 as it is made (`O_EXCL`,
`O_NOFOLLOW`), written through its descriptor and renamed over the path; a symbolic