A cancelled request stops the e-mail two-factor code send #30
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.
Dependencies
No dependencies set
Reference
lantea-one/ninlil#30
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
TwoFactorController.SendEmailCode()(src/dotnet/src/Ninlil.Web/Controllers/TwoFactorController.cs:270-302)takes no cancellation token, so
emailSender.SendAsync(which accepts one,src/dotnet/src/Ninlil.Dns.Identity/Email/IEmailSender.cs:18-23) runs on after the client goesaway. It is the only action in the controllers without one. Its summary at
:266is also oneover-long unwrapped line.
What changes
Add
CancellationToken stoppingTokenand pass it toSendAsync; rewrap the summary. Thecooldown is acquired before the send (by design,
TwoFactorEmailCodeCooldown.cs:12-13), so acancelled send still uses it: keep that and say so.
Acceptance
OpenApiSnapshotTestsgreen.Source
d-design.md:393(TwoFactorController.SendEmailCodecancellation, B3e-new-5).Ghost referenced this issue2026-11-05 07:36:44 -05:00