1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

ed25519: better error message for an incorrect password hash

This commit is contained in:
Sergei Golubchik
2019-01-18 19:28:44 +01:00
parent c94ec9fc67
commit 103a32fdd3
4 changed files with 17 additions and 2 deletions

View File

@@ -39,6 +39,10 @@ show grants for test1@localhost;
Grants for test1@localhost
GRANT USAGE ON *.* TO 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
drop user test1@localhost;
create user test1@localhost identified via ed25519 using 'foo';
ERROR HY000: Password hash should be 43 characters long
create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890';
ERROR HY000: Password hash should be base64 encoded
create user test1@localhost identified via ed25519 using password('foo');
show grants for test1@localhost;
Grants for test1@localhost

View File

@@ -29,6 +29,10 @@ let $pwd=`select ed25519_password("secret")`;
eval create user test1@localhost identified via ed25519 using '$pwd';
show grants for test1@localhost;
drop user test1@localhost;
--error ER_PASSWD_LENGTH
create user test1@localhost identified via ed25519 using 'foo';
--error ER_PASSWD_LENGTH
create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890';
create user test1@localhost identified via ed25519 using password('foo');
show grants for test1@localhost;
select ed25519_password('foo');