fix(auth): only a session made since dismisses the owner's warning
The full reading's L1: the warning that ten wrong proofs ended a session is there for the owner to learn of it, and any other session of the account (another app on the same stolen phone) dismissed it. Now only a session made after the warning dismisses it (signed in again, or the sign-in that first shows it); an older one is refused (PasswordRefusal.signedInBefore, its own text in English and German), and a new password clears it as before. A member tells the register when its session asking was made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
76291e6ab4
commit
003cb4821a
8 changed files with 165 additions and 24 deletions
|
|
@ -232,5 +232,6 @@
|
|||
"passwordResetsCallOff": "Absagen",
|
||||
"passwordCallOffTitle": "Zurücksetzen absagen",
|
||||
"passwordCallOffIntro": "Dein Passwort und ein Code sagen jedes anstehende Zurücksetzen ab.",
|
||||
"passwordSectionGitHubEndsDeletes": "Die Anmeldung mit GitHub endet am {date}. Dann wird dein Konto mit allem darin gelöscht, es sei denn, du richtest vorher ein Passwort ein."
|
||||
"passwordSectionGitHubEndsDeletes": "Die Anmeldung mit GitHub endet am {date}. Dann wird dein Konto mit allem darin gelöscht, es sei denn, du richtest vorher ein Passwort ein.",
|
||||
"passwordSignedInBefore": "Nur ein seitdem angemeldetes Gerät kann diese Warnung ausblenden: Melde dich auf diesem neu an oder ändere dein Passwort."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -507,5 +507,6 @@
|
|||
"type": "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"passwordSignedInBefore": "Only a device signed in since then can dismiss this warning: sign in again on this one, or change your password."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1500,6 +1500,12 @@ abstract class HalkyonAppLocalizations {
|
|||
/// In en, this message translates to:
|
||||
/// **'Sign-in with GitHub ends on {date}. Your account, with everything in it, will be deleted then, unless you set up a password before.'**
|
||||
String passwordSectionGitHubEndsDeletes(String date);
|
||||
|
||||
/// No description provided for @passwordSignedInBefore.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Only a device signed in since then can dismiss this warning: sign in again on this one, or change your password.'**
|
||||
String get passwordSignedInBefore;
|
||||
}
|
||||
|
||||
class _HalkyonAppLocalizationsDelegate
|
||||
|
|
|
|||
|
|
@ -874,4 +874,8 @@ class HalkyonAppLocalizationsDe extends HalkyonAppLocalizations {
|
|||
String passwordSectionGitHubEndsDeletes(String date) {
|
||||
return 'Die Anmeldung mit GitHub endet am $date. Dann wird dein Konto mit allem darin gelöscht, es sei denn, du richtest vorher ein Passwort ein.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get passwordSignedInBefore =>
|
||||
'Nur ein seitdem angemeldetes Gerät kann diese Warnung ausblenden: Melde dich auf diesem neu an oder ändere dein Passwort.';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -857,6 +857,10 @@ class HalkyonAppLocalizationsEn extends HalkyonAppLocalizations {
|
|||
String passwordSectionGitHubEndsDeletes(String date) {
|
||||
return 'Sign-in with GitHub ends on $date. Your account, with everything in it, will be deleted then, unless you set up a password before.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get passwordSignedInBefore =>
|
||||
'Only a device signed in since then can dismiss this warning: sign in again on this one, or change your password.';
|
||||
}
|
||||
|
||||
/// The translations for English, as used in the United Kingdom (`en_GB`).
|
||||
|
|
|
|||
|
|
@ -464,6 +464,7 @@ PasswordProblem _problemOf(protocol.PasswordRefusal reason) => switch (reason) {
|
|||
protocol.PasswordRefusal.sessionEnded => PasswordProblem.sessionEnded,
|
||||
protocol.PasswordRefusal.passwordChanged => PasswordProblem.passwordChanged,
|
||||
protocol.PasswordRefusal.signInAgain => PasswordProblem.signInAgain,
|
||||
protocol.PasswordRefusal.signedInBefore => PasswordProblem.signedInBefore,
|
||||
};
|
||||
|
||||
/// Keeps one session in memory, for a client used once.
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ enum PasswordProblem() {
|
|||
/// then go on.
|
||||
signInAgain,
|
||||
|
||||
/// The warning that a session was ended is dismissed only by a session
|
||||
/// made since: sign in again on this device, or change the password.
|
||||
signedInBefore,
|
||||
|
||||
/// No reset waits for the address.
|
||||
noReset,
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ String passwordProblemText(BuildContext context, PasswordFailed failed) {
|
|||
PasswordProblem.sessionEnded => l10n.passwordSessionEnded,
|
||||
PasswordProblem.passwordChanged => l10n.passwordChangedSignInAgain,
|
||||
PasswordProblem.signInAgain => l10n.passwordSignInAgain,
|
||||
PasswordProblem.signedInBefore => l10n.passwordSignedInBefore,
|
||||
PasswordProblem.noReset => l10n.passwordNoReset,
|
||||
PasswordProblem.passwordExists => l10n.passwordExists,
|
||||
PasswordProblem.addressTaken => l10n.passwordAddressTaken,
|
||||
|
|
|
|||
Loading…
Reference in a new issue