diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-04-29 10:50:39 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-05-05 09:19:40 -0400 |
commit | 1512078a7a56779d6fdd307a93187b61494de897 (patch) | |
tree | 44626f5a2ea0e53ff5336b9e35b2d4fe8721224d /mysql-test/suite | |
parent | edbd0ceddaf25508e9949fa3f5bd4bca8f4662bf (diff) | |
download | mariadb-git-1512078a7a56779d6fdd307a93187b61494de897.tar.gz |
MDEV-9851: CREATE USER w/o IDENTIFIED BY clause causes crash when using cracklib plugin
Do not allow NULL password to pass directly to password
validation plugin.
Diffstat (limited to 'mysql-test/suite')
4 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result index 638f138b986..dc31cb6d044 100644 --- a/mysql-test/suite/plugins/r/cracklib_password_check.result +++ b/mysql-test/suite/plugins/r/cracklib_password_check.result @@ -39,6 +39,12 @@ Warning 1819 cracklib: it is based on a dictionary word Error 1819 Your password does not satisfy the current policy requirements grant select on *.* to foobar identified by 'q$%^&*rty'; drop user foobar; +# +# MDEV-9851: CREATE USER w/o IDENTIFIED BY clause causes crash +# when using cracklib plugin +# +create user 'newuser'@'localhost'; +ERROR HY000: Your password does not satisfy the current policy requirements uninstall plugin cracklib_password_check; create user foo1 identified by 'pwd'; drop user foo1; diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result index c21298cea33..bbb96bb8c38 100644 --- a/mysql-test/suite/plugins/r/simple_password_check.result +++ b/mysql-test/suite/plugins/r/simple_password_check.result @@ -72,6 +72,8 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED create user foo1 identified by 'pwd'; ERROR HY000: Your password does not satisfy the current policy requirements +create user foo1; +ERROR HY000: Your password does not satisfy the current policy requirements grant select on *.* to foo1 identified by 'pwd'; ERROR HY000: Your password does not satisfy the current policy requirements grant select on *.* to `FooBar1!` identified by 'FooBar1!'; diff --git a/mysql-test/suite/plugins/t/cracklib_password_check.test b/mysql-test/suite/plugins/t/cracklib_password_check.test index d0e05fed926..89b53b656d6 100644 --- a/mysql-test/suite/plugins/t/cracklib_password_check.test +++ b/mysql-test/suite/plugins/t/cracklib_password_check.test @@ -30,6 +30,14 @@ show warnings; grant select on *.* to foobar identified by 'q$%^&*rty'; drop user foobar; +--echo # +--echo # MDEV-9851: CREATE USER w/o IDENTIFIED BY clause causes crash +--echo # when using cracklib plugin +--echo # + +--error ER_NOT_VALID_PASSWORD +create user 'newuser'@'localhost'; + uninstall plugin cracklib_password_check; create user foo1 identified by 'pwd'; diff --git a/mysql-test/suite/plugins/t/simple_password_check.test b/mysql-test/suite/plugins/t/simple_password_check.test index bfe3464f5f9..4965ee492d2 100644 --- a/mysql-test/suite/plugins/t/simple_password_check.test +++ b/mysql-test/suite/plugins/t/simple_password_check.test @@ -16,6 +16,10 @@ select * from information_schema.system_variables where variable_name like 'simp --error ER_NOT_VALID_PASSWORD create user foo1 identified by 'pwd'; +# Create user with no password. +--error ER_NOT_VALID_PASSWORD +create user foo1; + --error ER_NOT_VALID_PASSWORD grant select on *.* to foo1 identified by 'pwd'; |