1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/accounts
catborise 21bd56a9f9 fix(accounts): an admin still on the password "admin" must change it
Every upstream release and this fork's up to v2.0.0 created the first
user as admin/admin. The first-login password change only covered the
password the panel generates itself (data/admin_password), so an upgraded
installation whose admin never changed the default kept a working
admin/admin login with no prompt, on the pages and through API tokens.

Migration accounts.0013 marks a user named admin whose password is
"admin" with must_change_password: the next login goes to the password
change form, and the API refuses the user's tokens until then. Only that
one name is checked, so the migration hashes one password at most.

Found by upgrading an installation of the upstream release of
September 2026 (installer and Docker) to this version: admin/admin still
signed in.
2026-11-06 15:20:35 +03:00
..
migrations fix(accounts): an admin still on the password "admin" must change it 2026-11-06 15:20:35 +03:00
templates fix(accounts): an OTP mail links to the QR code instead of holding its secret 2026-11-05 18:17:00 +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 fix(accounts): an admin still on the password "admin" must change it 2026-11-06 15:20:35 +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 feat(admin): a password an administrator sets can be one the user must change 2026-10-25 22:38:40 +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 fix(accounts): an OTP mail links to the QR code instead of holding its secret 2026-11-05 18:17:00 +03:00
utils.py fix(accounts): the admin's Email OTP sent twice at once makes one device 2026-11-05 18:58:13 +03:00
views.py fix(accounts): an API token form sent twice makes one token 2026-11-05 18:58:13 +03:00