From 7b334998116316d1772b1ce1395818d755308bf0 Mon Sep 17 00:00:00 2001
From: Nikat <nikita.a.sergeev@mail.ru>
Date: Thu, 20 May 2021 14:32:50 +0300
Subject: MySQL Backend Patch for scram-sha512 (#3582)

* Update mysql.new.sql

scram-sha512 does not work, because serverkey is longer, then that array. All passwords was unhashed.

* Update mysql.sql
---
 sql/mysql.new.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'sql/mysql.new.sql')

diff --git a/sql/mysql.new.sql b/sql/mysql.new.sql
index ed4f93348..c6d74bb91 100644
--- a/sql/mysql.new.sql
+++ b/sql/mysql.new.sql
@@ -20,8 +20,8 @@ CREATE TABLE users (
     username varchar(191) NOT NULL,
     server_host varchar(191) NOT NULL,
     password text NOT NULL,
-    serverkey varchar(64) NOT NULL DEFAULT '',
-    salt varchar(64) NOT NULL DEFAULT '',
+    serverkey varchar(128) NOT NULL DEFAULT '',
+    salt varchar(128) NOT NULL DEFAULT '',
     iterationcount integer NOT NULL DEFAULT 0,
     created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
     PRIMARY KEY (server_host(191), username)
-- 
cgit v1.2.3

