summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-07-21 12:09:17 +0200
committerSergei Golubchik <serg@mariadb.org>2019-07-21 19:47:44 +0200
commit82563c5fc0a40d64d8e8e9de2bf6f904fa6c0dc6 (patch)
treef421f6e8e823b9a472f0cfd8175bd504d795b040 /mysql-test
parentf90040fd9ccb99cb4541d181a7052c37dc38decb (diff)
downloadmariadb-git-82563c5fc0a40d64d8e8e9de2bf6f904fa6c0dc6.tar.gz
MDEV-20110 don't try to load client plugins with invalid names
reported by lixtelnis
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/connect_debug.result5
-rw-r--r--mysql-test/t/connect_debug.test11
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/connect_debug.result b/mysql-test/r/connect_debug.result
index 0452b238db9..3151166a0e6 100644
--- a/mysql-test/r/connect_debug.result
+++ b/mysql-test/r/connect_debug.result
@@ -3,3 +3,8 @@ set global debug_dbug='+d,auth_disconnect';
create user 'bad' identified by 'worse';
set global debug_dbug=@old_dbug;
drop user bad;
+set global debug_dbug='+d,auth_invalid_plugin';
+create user 'bad' identified by 'worse';
+ERROR 2059 (HY000): Authentication plugin 'foo/bar' cannot be loaded: invalid plugin name
+set global debug_dbug=@old_dbug;
+drop user bad;
diff --git a/mysql-test/t/connect_debug.test b/mysql-test/t/connect_debug.test
index 299b605b2cd..7a2f2872b79 100644
--- a/mysql-test/t/connect_debug.test
+++ b/mysql-test/t/connect_debug.test
@@ -1,3 +1,4 @@
+source include/not_embedded.inc;
source include/have_debug.inc;
set @old_dbug=@@global.debug_dbug;
@@ -10,3 +11,13 @@ create user 'bad' identified by 'worse';
--exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse
set global debug_dbug=@old_dbug;
drop user bad;
+
+#
+# malicious server, invalid plugin name
+#
+set global debug_dbug='+d,auth_invalid_plugin';
+create user 'bad' identified by 'worse';
+--error 1
+--exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse 2>&1
+set global debug_dbug=@old_dbug;
+drop user bad;