Sign-in hardening: count parallel wrong passwords of a session, and small follow-ups of the signed-in count
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- authentication, backend
Direzione di ricerca
Start in src/FluentCMS.Core/Identity/ and trace CmsUserManager.ChangePasswordAsync, TwoFactorService.RequireCodeAsync, ClearingPasswordChangeAsync, SetPasswordAsync, and CmsUserStore.cs; the issue also names docs/host-configuration.md. Read the linked follow-ups and their review context, then find the existing tests for these flows. Done means the five listed behaviors are covered by code, tests, or the specified spec update, and the documentation sentence is corrected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-ups of #3371, #3378 and #3381 (#3444), found in its review. Paths are under src/FluentCMS.Core/Identity/.
- Parallel wrong passwords on change-password are not all counted.
CmsUserManager.ChangePasswordAsyncignores the result ofSignedInAccessFailedAsync, as it ignoredAccessFailedAsyncbefore. A holder of a stolen cookie who posts N guesses at once has them all read one concurrency stamp: each answers "wrong password", one save wins, and the count rises by one. A right guess that loses its save answersConcurrencyFailure, which tells the sender it was right. The per-addressAuthlimit (20 a minute) is then the only bound, against the intended 5 in 5 minutes. Codes are not affected, since a right code must win its own save. - A right two-factor code resets the count of wrong passwords too.
ResetSignedInFailuresAsyncis called fromTwoFactorService.RequireCodeAsync, so a session that holds the second factor gives 4 wrong passwords, one right code at/me/two-factor/recovery-codes, and starts again. - The forced-change flag is put back over a reloaded user.
ClearingPasswordChangeAsyncandSetPasswordAsyncrestoremustChangePasswordafter a failed save without checking that the user was not reloaded, the pattern #3381 fixed for the failure count. No path of core saves the user again in that scope today. IsTokenKeyViolationmatches the table name anywhere in the provider's message (CmsUserStore.cs). SQL Server repeats the duplicate key value, so another unique violation whose value containscms_user_tokenwould be answered as a refusal. It can never become a success.docs/host-configuration.mdstill says the token endpoint refuses a code or refresh token of a locked-out user, which #3271 ended.
Wanted
- Every wrong current password of a session counted when requests run at once, and no different answer for a right one that lost its save, with a test.
- Wrong passwords and wrong codes of a session counted apart, or the reason they share a count recorded in the spec.
- The flag restored only when the user was not reloaded.
- The token key matched by the constraint's name on the three providers.
- The sentence corrected.
Bundle 28.
- Lingua principale
- C#
- Stelle
- 567
- Fork
- 107
- Merge medio
- 1h 19m
- PR unite (30g)
- 353
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fluentcms/FluentCMS
-
area:localization plugin type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:storage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
area:testing type:bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area:api area:publishing type:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
fluentcms/FluentCMS#3473 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:storage plugin type:bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fluentcms/FluentCMS
Issue simili
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtimeForse già presa @Goldziher l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
lompotc silently drops Java/C# class members past 128 instead of erroring, as its header claimsApertabug sev-5 vm
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
area:jobads-cv bug FE mvp P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
klasolsson81/jobbliggaren#2271 ·
I maintainer di solito rispondono entro 1 giorno