mirror of
https://github.com/MariaDB/server.git
synced 2025-02-12 00:15:35 +01:00
9e1fb104a3
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF39AEP5WyjM2MAMF8WVvJMdM0dgFAmck77AACgkQ8WVvJMdM 0dgccQ/+Lls8fWt4D+gMPP7x+drJSO/IE/gZFt3ugbWF+/p3B2xXAs5AAE83wxEh QSbp4DCkb/9PnuakhLmzg0lFbxMUlh4rsJ1YyiuLB2J+YgKbAc36eQQf+rtYSipd DT5uRk36c9wOcOXo/mMv4APEvpPXBIBdIL4VvpKFbIOE7xT24Sp767zWXdXqrB1f JgOQdM2ct+bvSPC55oZ5p1kqyxwvd6K6+3RB3CIpwW9zrVSLg7enT3maLjj/761s jvlRae+Cv+r+Hit9XpmEH6n2FYVgIJ3o3WhdAHwN0kxKabXYTg7OCB7QxDZiUHI9 C/5goKmKaPB1PCQyuTQyLSyyK9a8nPfgn6tqw/p/ZKDQhKT9sWJv/5bSWecrVndx LLYifSTrFC/eXLzgPvCnNv/U8SjsZaAdMIKS681+qDJ0P5abghUIlGnMYTjYXuX1 1B6Vrr0bdrQ3V1CLB3tpkRjpUvicrsabtuAUAP65QnEG2G9UJXklOer+DE291Gsl f1I0o6C1zVGAOkUUD3QEYaHD8w7hlvyfKme5oXKUm3DOjaAar5UUKLdr6prxRZL4 ebhmGEy42Mf8fBYoeohIxmxgvv6h2Xd9xCukgPp8hFpqJGw8abg7JNZTTKH4h2IY J51RpD10h4eoi6WRn3opEcjexTGvZ+xNR7yYO5WxWw6VIre9IUA= =s+WW -----END PGP SIGNATURE----- Merge tag '11.4' into 11.6 MariaDB 11.4.4 release
94 lines
4.2 KiB
Text
94 lines
4.2 KiB
Text
install soname "password_reuse_check";
|
|
set global password_reuse_check_interval= 0;
|
|
# Default value (sould be unlimited i.e. 0)
|
|
SHOW GLOBAL VARIABLES like "password_reuse_check%";
|
|
Variable_name Value
|
|
password_reuse_check_interval 0
|
|
# insert user
|
|
grant select on *.* to user_name@localhost identified by 'test_pwd';
|
|
grant select on *.* to user_name@localhost identified by 'test_pwd';
|
|
ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
show warnings;
|
|
Level Code Message
|
|
Warning 1819 password_reuse_check: The password was already used
|
|
Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
alter user user_name@localhost identified by 'test_pwd';
|
|
ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
|
|
show warnings;
|
|
Level Code Message
|
|
Warning 1819 password_reuse_check: The password was already used
|
|
Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
Error 1396 Operation ALTER USER failed for 'user_name'@'localhost'
|
|
# check exparation
|
|
set global password_reuse_check_interval= 10;
|
|
alter user user_name@localhost identified by 'test_pwd';
|
|
ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
|
|
show warnings;
|
|
Level Code Message
|
|
Warning 1819 password_reuse_check: The password was already used
|
|
Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
Error 1396 Operation ALTER USER failed for 'user_name'@'localhost'
|
|
select hex(hash) from mysql.password_reuse_check_history;
|
|
hex(hash)
|
|
B9F970DE4DA0145F842526C1BC9DBBBDB3EF80FDD7BE98061DAE3D18F492AA37668C07322DD21650C66B48FC78F0EAF6CB08245CC895BFDC43BE6921B07E5240
|
|
# emulate old password
|
|
update mysql.password_reuse_check_history set time= date_sub(now(), interval
|
|
11 day);
|
|
alter user user_name@localhost identified by 'test_pwd';
|
|
show warnings;
|
|
Level Code Message
|
|
drop user user_name@localhost;
|
|
show create table mysql.password_reuse_check_history;
|
|
Table Create Table
|
|
password_reuse_check_history CREATE TABLE `password_reuse_check_history` (
|
|
`hash` binary(64) NOT NULL,
|
|
`time` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`hash`),
|
|
KEY `tm` (`time`)
|
|
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
|
|
select count(*) from mysql.password_reuse_check_history;
|
|
count(*)
|
|
1
|
|
drop table mysql.password_reuse_check_history;
|
|
# test error messages
|
|
set global password_reuse_check_interval= 0;
|
|
drop table if exists mysql.password_reuse_check_history;
|
|
Warnings:
|
|
Note 1051 Unknown table 'mysql.password_reuse_check_history'
|
|
# test error messages
|
|
create table mysql.password_reuse_check_history (wrong_structure int);
|
|
grant select on *.* to user_name@localhost identified by 'test_pwd';
|
|
ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
show warnings;
|
|
Level Code Message
|
|
Warning 1105 password_reuse_check:[1054] Unknown column 'hash' in 'INSERT INTO'
|
|
Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
set global password_reuse_check_interval= 10;
|
|
grant select on *.* to user_name@localhost identified by 'test_pwd';
|
|
ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
show warnings;
|
|
Level Code Message
|
|
Warning 1105 password_reuse_check:[1054] Unknown column 'time' in 'WHERE'
|
|
Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
|
|
drop table mysql.password_reuse_check_history;
|
|
#
|
|
# MDEV-28838: password_reuse_check plugin mixes username and password
|
|
#
|
|
grant select on *.* to user_name@localhost identified by 'test_pwd';
|
|
grant select on *.* to user_nam@localhost identified by 'etest_pwd';
|
|
show warnings;
|
|
Level Code Message
|
|
drop user user_name@localhost;
|
|
drop user user_nam@localhost;
|
|
drop table mysql.password_reuse_check_history;
|
|
grant select on *.* to user_name@localhost identified by 'test_pwd';
|
|
grant select on *.* to tuser_name@localhos identified by 'test_pwd';
|
|
show warnings;
|
|
Level Code Message
|
|
drop user user_name@localhost;
|
|
drop user tuser_name@localhos;
|
|
#
|
|
# End of 10.7 tests
|
|
#
|
|
drop table mysql.password_reuse_check_history;
|
|
uninstall plugin password_reuse_check;
|