mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-9273 ERROR 1819 on grant statment for existing user
Cannot do password validation in fix_lex_user(), we don't know there what "GRANT ... TO user" means - creating a new user with an empty password (need validation) or granting privileges to an existing user (no validation needed). Move validation down into replace_user_table(). And copy into check_change_password().
This commit is contained in:
@ -79,6 +79,7 @@ ERROR HY000: Your password does not satisfy the current policy requirements
|
||||
grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
|
||||
drop user `BarFoo1!`;
|
||||
create user foo1 identified by 'aA.12345';
|
||||
grant select on *.* to foo1;
|
||||
drop user foo1;
|
||||
set global simple_password_check_digits=3;
|
||||
set global simple_password_check_letters_same_case=3;
|
||||
@ -129,7 +130,7 @@ ERROR HY000: The MariaDB server is running with the --strict-password-validation
|
||||
create user foo2 identified with mysql_native_password using '';
|
||||
ERROR HY000: Your password does not satisfy the current policy requirements
|
||||
grant select on *.* to foo2 identified with mysql_old_password;
|
||||
ERROR HY000: Your password does not satisfy the current policy requirements
|
||||
ERROR 28000: Can't find any matching row in the user table
|
||||
update mysql.user set password='xxx' where user='foo1';
|
||||
set global strict_password_validation=0;
|
||||
set password for foo1 = '';
|
||||
|
Reference in New Issue
Block a user