Sign-in hardening: count parallel wrong passwords of a session, and small follow-ups of the signed-in count
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C#
- 星标
- 567
- 派生
- 107
- 平均合并
- 1 小时 19 分钟
- 30 天内合并 PR
- 353
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fluentcms/FluentCMS 的其他 Issue
-
area:localization plugin type:bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:storage type:bug
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
-
area:testing type:bug
难度 3/5 1-2 天 新手友好度 72/100
维护者通常 1 天内回复
-
area:api area:publishing type:feature
难度 4/5 3-5 天 新手友好度 55/100
fluentcms/FluentCMS#3473 · 1 条评论 ·
维护者通常 1 天内回复
-
area:storage plugin type:bug
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
查看 fluentcms/FluentCMS 的全部 Issue
相似的 Issue
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtime可能已有人在做 @Goldziher 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
priority:P2
难度 2/5 1-3 小时 新手友好度 82/100
-
bug sev-5 vm
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 85/100
-
area:jobads-cv bug FE mvp P3
难度 2/5 1-3 小时 新手友好度 77/100
klasolsson81/jobbliggaren#2271 ·
维护者通常 1 天内回复