fix(auth): codes after the recovery phrase count apart from the password's
The full reading's M3: whoever knows the password made the account's codes
wait, and that wait refused the phrase's owner their reset too, so they were
held out of both without end. Codes now count per account and per way they
came (SecondFactorPath: after the password, after the phrase), each with
its own waits; a code accepted either way clears both.
Migration (module, Learn's and Todo's servers; Learn's device schema
rebuilds the server-only table):
DROP INDEX "second_factor_failures_person_idx";
ALTER TABLE "second_factor_failures" ADD COLUMN "path" text NOT NULL
DEFAULT 'password'::text;
CREATE UNIQUE INDEX "second_factor_failures_person_idx" ON
"second_factor_failures" USING btree ("authUserId", "path");
Existing rows are the password's, unique per account, so unique per
account and way too.
Also the hosts' generated future calls, for the pruning's doc comment the
lapsed resets' commit changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
43fcc8aac2
commit
4d1cd2045c
1 changed files with 41930 additions and 17 deletions
|
|
@ -293,7 +293,8 @@ class FilePruningPruneFilesFutureCall extends _is.FutureCall
|
|||
}
|
||||
|
||||
/// Prunes one batch and logs how many people went; once GitHub sign-in
|
||||
/// has ended (`GITHUB_SIGN_IN_ENDS`), forgets every GitHub ID too.
|
||||
/// has ended (`GITHUB_SIGN_IN_ENDS`), forgets every GitHub ID too; and
|
||||
/// forgets the resets that lapsed (ADR 0017).
|
||||
class PruningPruneAnonymousPeopleFutureCall extends _is.FutureCall
|
||||
implements _is.InvokableFutureCall {
|
||||
@override
|
||||
|
|
|
|||
Loading…
Reference in a new issue