1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-01 00:16:04 +00:00
webvirtcloud/accounts
catborise 135839bd66 feat(accounts): an administrator can reset a user's OTP
A user's OTP secret could not be changed: "Lost OTP?" and the admin's
"Email OTP QR code" both send the same secret again, so a stolen phone
kept making valid codes. The user's profile page now has "Reset OTP",
which deletes the user's TOTP device; they sign in with the password
alone until a new QR code is mailed, which has a new secret.

The mailed link now names the device, not the user: a link mailed before
a reset shows nothing, not the next device's secret. A new signing salt
refuses the links that named a user, whose id may be another user's device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
2026-11-10 08:10:48 +03:00
..
migrations fix(accounts): an admin still on the password "admin" must change it 2026-11-06 15:20:35 +03:00
templates feat(accounts): an administrator can reset a user's OTP 2026-11-10 08:10:48 +03:00
templatetags lint with black python. convert f style strings to old one. some small fixes 2020-11-05 12:34:31 +03:00
tests feat(accounts): an administrator can reset a user's OTP 2026-11-10 08:10:48 +03:00
__init__.py chore: remove code nothing uses 2026-11-06 10:53:37 +03:00
apps.py test: no seeded admin password, settings changed only for a test, no local libvirt by default 2026-11-06 13:48:03 +03:00
auth.py fix(admin): a forced password change cannot trap a user or be skipped with a token 2026-10-26 10:12:53 +03:00
checks.py chore: comments say what the code does 2026-11-06 13:48:04 +03:00
forms.py feat(templates): the shared form and delete pages in a centred column 2026-10-31 18:10:05 +03:00
lockout.py feat(accounts): failed logins lock a user for the address they come from 2026-10-06 11:05:03 +03:00
middleware.py fix(api): an error's status says what it is, and its body is always {"detail"} 2026-11-07 13:29:46 +03:00
models.py refactor(accounts): UserInstance's uniqueness is a UniqueConstraint 2026-11-06 13:46:27 +03:00
otp.py fix(accounts): a username longer than the field is refused by the login form 2026-10-23 16:06:10 +03:00
urls.py feat(accounts): an administrator can reset a user's OTP 2026-11-10 08:10:48 +03:00
utils.py feat(accounts): an administrator can reset a user's OTP 2026-11-10 08:10:48 +03:00
views.py feat(accounts): an administrator can reset a user's OTP 2026-11-10 08:10:48 +03:00