⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
suite
/
x
/
t
/
View File Name :
connection_skip_grant_table.test
## This is test file for connection authentication using mysqlx. ## --source ../include/xplugin_preamble.inc call mtr.add_suppression("Plugin 'mysqlx' will be forced to shutdown"); call mtr.add_suppression("Unsuccessful login attempt: Invalid user or password"); call mtr.add_suppression("Internal account mysqlxsys@localhost can't be removed because server is running without user privileges ..skip-grant-tables. switch"); SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE,PLUGIN_TYPE_VERSION,PLUGIN_LIBRARY,PLUGIN_LIBRARY_VERSION,PLUGIN_AUTHOR,PLUGIN_DESCRIPTION,PLUGIN_LICENSE,LOAD_OPTION from information_schema.plugins where PLUGIN_NAME LIKE '%xplugin%'; create user nonblank@localhost identified by 'nonblank'; --write_file $MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp -->sql select user(),current_user(),@@bind_address; -->endsql EOF --write_file $MYSQL_TMP_DIR/mysqlx-connection_uninstallplugin.tmp -->expecterror ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED -->sql uninstall plugin mysqlx; -->endsql EOF --echo Test starts here --exec $MYSQLXTEST -u nonblank --password='nonblank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 --echo try login with valid user when server started with skip-grant-tables and mysqlx loaded --replace_regex /\.dll/.so/ let $restart_parameters = restart: --skip-grant-tables --plugin-load=$MYSQLXPLUGIN; --source ../include/restart_mysqld_and_wait_for_xplugin.inc --echo Connection should success with valid password --exec $MYSQLXTEST -u nonblank --password='nonblank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 --echo Connection should success with invalid password --exec $MYSQLXTEST -u nonblank --password='blank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 FLUSH PRIVILEGES; --let $expected_error_msg= Invalid user or password \(code 1045\) --source ../include/mysqlxtest_expected_error.inc --exec $MYSQLXTEST -u nonblank --password='blank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 ##uninstall mysqlxplugin when server started with skip-grant-tables option and mysqlx loaded with super user --replace_regex /\.dll/.so/ let $restart_parameters = restart: --skip-grant-tables --plugin-load=$MYSQLXPLUGIN; --source ../include/restart_mysqld_and_wait_for_xplugin.inc --exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connection_uninstallplugin.tmp 2>&1 ##Bug#22369479 Executing uninstall when running with skip grant table was causing a SQL error # Error was changed to warning showing less implementation details to user UNINSTALL PLUGIN mysqlx; ##cleanup --remove_file $MYSQL_TMP_DIR/mysqlx-connection_uninstallplugin.tmp --remove_file $MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp --replace_regex /\.dll/.so/ let $restart_parameters = restart: --plugin-load=$MYSQLXPLUGIN; --source ../include/restart_mysqld_and_wait_for_xplugin.inc drop user nonblank@localhost; UNINSTALL PLUGIN mysqlx;