mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-23 01:55:10 -07:00
[Security] Harden credential format acceptance and challenge nonce validation
This commit is contained in:
parent
709233d977
commit
46be02fbcf
5 changed files with 43 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue