Wrong current passwords on a password or e-mail change are rate limited per account #284
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
Reference
lantea-one/ninlil#284
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
UsersController.ChangeMyPasswordand the newChangeMyEmail(#66) check the current password withUserManager.CheckPasswordAsync. That call does not count failures toward Identity's lockout. Someone holding a stolen access token can therefore guess the password through either endpoint without limit, which defeats the point of asking for the current password.What changes
SignInManager.CheckPasswordSignInAsync(user, password, lockoutOnFailure: true).PasswordMismatchfor a wrong password.Acceptance
dotnet test src/dotnet/tests/Ninlil.Web.Testspasses.Source
Found while implementing #66.
Ghost referenced this issue2026-11-05 05:10:40 -05:00
Ghost referenced this issue2026-11-05 05:11:42 -05:00
Changing the approach, following owner decision Q-REL-6 (#260): Ninlil has no account lockout. Sign-in is rate limited (
AdminLoginRateLimitOptions) instead, and the Identity lockout fields are being deprecated (#32, #33) and will be removed (#234). Counting wrong current passwords toward Identity lockout would bring those fields back to life and contradict that decision.The problem still holds: someone holding a stolen access token can guess the current password on
change-passwordandme/emailwithout limit. The fix is therefore a rate limit on wrong current-password attempts, counted per account, in the same style as the sign-in limit. Over the limit the endpoints answer 429. No lockout, no change to the lockout fields, and sign-in is unchanged.Changing your own password or e-mail address counts wrong current passwords toward account lockoutto Wrong current passwords on a password or e-mail change are rate limited per accountGhost referenced this issue2026-11-05 05:34:54 -05:00
Ghost referenced this issue2026-11-05 08:11:03 -05:00