mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 19:13:25 -08:00
[Server] Store a scrypt verifier when an admin resets a password (#7679)
The temporary password was written as a legacy salt+hash row, which makes the next login look like an authentication downgrade. A client holding a saved verifier refuses that downgrade, so the reset locked the account out of every modern client. Store the verifier and, where security/legacy_backup_key is configured, keep a sealed legacy hash of the same temporary password as the downgrade backup, so pre-challenge clients keep the credential path the reset used to provide. Without the key no row shape serves both: the verifier and the legacy hash cannot share one column, so those clients have no path at all. Warn at reset time that the new password has no pre-challenge path, and say so in servatrice.ini.example instead of promising that a reset gets them back in. Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
e08402ac94
commit
ef4574d2b9
4 changed files with 91 additions and 16 deletions
|
|
@ -455,9 +455,11 @@ authentication_strictness=mixed
|
|||
; the scrypt verifier, so old clients can still log in during the window below without
|
||||
; the database holding a fast-crackable hash in the clear.
|
||||
; Generate with: openssl rand -hex 32
|
||||
; If unset, migrated accounts have no downgrade window: old clients must use a password
|
||||
; reset to get back in. Rotating the key invalidates existing backups (they become
|
||||
; unusable immediately; expired ones are still purged).
|
||||
; If unset there is no downgrade path at all: a migrated account keeps only a scrypt
|
||||
; verifier, and an administrator's password reset stores a verifier too, so pre-challenge
|
||||
; clients cannot log in with the temporary password either. Set the key if you still serve
|
||||
; them. Rotating the key invalidates existing backups (they become unusable immediately;
|
||||
; expired ones are still purged).
|
||||
legacy_backup_key=
|
||||
|
||||
; Days a legacy password backup may go unused before it is purged from the database.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue