mirror of
https://github.com/MariaDB/server.git
synced 2025-07-24 19:42:23 +03:00
MDEV-26650: Failed ALTER USER/GRANT statement removes the password from the cache
Starting from 10.4 AUTH is not part of ACL_USER so changes have to be done over a copy, and bring in the cache only in case of success.
This commit is contained in:
@ -161,3 +161,23 @@ flush privileges;
|
||||
uninstall plugin simple_password_check;
|
||||
create user foo1 identified by 'pwd';
|
||||
drop user foo1;
|
||||
#
|
||||
# MDEV-26650: Failed ALTER USER/GRANT statement removes the
|
||||
# password from the cache
|
||||
#
|
||||
create user foo1@localhost identified by '<GDFH:3ghj';
|
||||
show grants for foo1@localhost;
|
||||
Grants for foo1@localhost
|
||||
GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
|
||||
install soname "simple_password_check";
|
||||
ALTER USER foo1@localhost identified by 'foo1';
|
||||
ERROR HY000: Operation ALTER USER failed for 'foo1'@'localhost'
|
||||
show grants for foo1@localhost;
|
||||
Grants for foo1@localhost
|
||||
GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
|
||||
flush privileges;
|
||||
show grants for foo1@localhost;
|
||||
Grants for foo1@localhost
|
||||
GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
|
||||
drop user foo1@localhost;
|
||||
uninstall plugin simple_password_check;
|
||||
|
@ -122,3 +122,17 @@ uninstall plugin simple_password_check;
|
||||
create user foo1 identified by 'pwd';
|
||||
drop user foo1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26650: Failed ALTER USER/GRANT statement removes the
|
||||
--echo # password from the cache
|
||||
--echo #
|
||||
create user foo1@localhost identified by '<GDFH:3ghj';
|
||||
show grants for foo1@localhost;
|
||||
install soname "simple_password_check";
|
||||
--error ER_CANNOT_USER
|
||||
ALTER USER foo1@localhost identified by 'foo1';
|
||||
show grants for foo1@localhost;
|
||||
flush privileges;
|
||||
show grants for foo1@localhost;
|
||||
drop user foo1@localhost;
|
||||
uninstall plugin simple_password_check;
|
||||
|
Reference in New Issue
Block a user