[Security] Harden credential format acceptance and challenge nonce validation

This commit is contained in:
Lukas Brübach 2026-09-02 20:12:44 +02:00 committed by GitHub
parent 709233d977
commit 46be02fbcf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 16 deletions

View file

@ -1,8 +1,9 @@
-- Servatrice db migration from version 36 to version 37
-- The column must hold "$scrypt$<n>$<r>$<p>$<salt>$<verifier>" (up to ~255 chars) and arbitrary
-- legacy base64 hashes, so it grows beyond the old 120-char size. varchar(255) is used as the
-- column type is promotion-safe and avoids the row-format change ALGORITHM=INSTANT cannot do.
-- legacy base64 hashes, so it grows beyond the old 120-char size. varchar(255) is used because
-- widening a CHAR requires a table rebuild, which ALGORITHM=INSTANT cannot perform — dropping the
-- clause lets the server pick a suitable algorithm (and any row-format change is avoided anyway).
ALTER TABLE `cockatrice_users` MODIFY `password_sha512` varchar(255) NOT NULL;
UPDATE cockatrice_schema_version SET version=37 WHERE version=36;
UPDATE cockatrice_schema_version SET version=37 WHERE version=36;