mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
cleanup: normalize LEX_USER to get rid of different representation of the same thing
username IDENTIFIED BY PASSWORD xxx username IDENTIFIED VIA mysql_native_password USING xxx etc also check for valid strlen(xxx)
This commit is contained in:
@ -178,3 +178,37 @@ mysqltest_db1.t1 repair status OK
|
||||
# Switching to connection 'default'.
|
||||
drop database mysqltest_db1;
|
||||
drop user mysqltest_u1@localhost;
|
||||
create user foo1 identified by password '11111111111111111111111111111111111111111';
|
||||
create user foo2 identified by password '2222222222222222';
|
||||
create user foo3 identified via mysql_native_password using '11111111111111111111111111111111111111111';
|
||||
create user foo4 identified via mysql_old_password using '2222222222222222';
|
||||
grant select on test.* to foo5 identified by password '11111111111111111111111111111111111111111';
|
||||
grant select on test.* to foo6 identified by password '2222222222222222';
|
||||
grant select on test.* to foo7 identified via mysql_native_password using '11111111111111111111111111111111111111111';
|
||||
grant select on test.* to foo8 identified via mysql_old_password using '2222222222222222';
|
||||
select user,password,plugin,authentication_string from mysql.user where user like 'foo%';
|
||||
user password plugin authentication_string
|
||||
foo1 11111111111111111111111111111111111111111
|
||||
foo2 2222222222222222
|
||||
foo3 11111111111111111111111111111111111111111
|
||||
foo4 2222222222222222
|
||||
foo5 11111111111111111111111111111111111111111
|
||||
foo6 2222222222222222
|
||||
foo7 11111111111111111111111111111111111111111
|
||||
foo8 2222222222222222
|
||||
drop user foo1;
|
||||
drop user foo2;
|
||||
drop user foo3;
|
||||
drop user foo4;
|
||||
drop user foo5;
|
||||
drop user foo6;
|
||||
drop user foo7;
|
||||
drop user foo8;
|
||||
create user foo1 identified via mysql_native_password using '00';
|
||||
ERROR HY000: Password hash should be a 41-digit hexadecimal number
|
||||
create user foo2 identified via mysql_native_password using '2222222222222222';
|
||||
ERROR HY000: Password hash should be a 41-digit hexadecimal number
|
||||
create user foo3 identified via mysql_old_password using '00';
|
||||
ERROR HY000: Password hash should be a 16-digit hexadecimal number
|
||||
create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111';
|
||||
ERROR HY000: Password hash should be a 16-digit hexadecimal number
|
||||
|
Reference in New Issue
Block a user