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:
@ -26,6 +26,7 @@ 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;
|
||||
@ -78,7 +79,7 @@ create user foo2 identified with mysql_native_password using '111111111111111111
|
||||
grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
|
||||
--error ER_NOT_VALID_PASSWORD
|
||||
create user foo2 identified with mysql_native_password using '';
|
||||
--error ER_NOT_VALID_PASSWORD
|
||||
--error ER_PASSWORD_NO_MATCH
|
||||
grant select on *.* to foo2 identified with mysql_old_password;
|
||||
|
||||
# direct updates are not protected
|
||||
|
Reference in New Issue
Block a user