From cd311cc2dd303188c083b5fe53ea411add41c958 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Wed, 19 Aug 2020 17:36:16 -0500 Subject: [PATCH 1/3] Remove the wptests password in wp-tests-config.php Probably more secure, as this new password is less likely to be used. --- tests/wp-tests-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/wp-tests-config.php b/tests/wp-tests-config.php index 4612dc745..d6234d612 100644 --- a/tests/wp-tests-config.php +++ b/tests/wp-tests-config.php @@ -22,7 +22,7 @@ define( 'DB_HOST', 'tests-mysql' ); define( 'DB_NAME', 'wptests' ); define( 'DB_USER', 'wptests' ); -define( 'DB_PASSWORD', 'wptests' ); +define( 'DB_PASSWORD', '' ); define( 'DB_CHARSET', 'utf8' ); define( 'DB_COLLATE', '' ); From 055b69162c88fd72914252cb20a759e15c8fab4c Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Wed, 19 Aug 2020 17:58:02 -0500 Subject: [PATCH 2/3] Replace more passwords, including in .circleci/config.yml This might need more work, it might not pass. --- .circleci/config.yml | 3 ++- bin/install-wp-tests.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee60439ba..41f6d9c7f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ jobs: MYSQL_DATABASE: youremptytestdbnamehere MYSQL_HOST: 127.0.0.1 MYSQL_USER: yourusernamehere - MYSQL_PASSWORD: yourpasswordhere + MYSQL_PASSWORD: MYSQL_ROOT_PASSWORD: wordpress steps: - run: @@ -67,6 +67,7 @@ jobs: git clone git://develop.git.wordpress.org/ wordpress-develop cp wordpress-develop/wp-tests-config-sample.php wordpress-develop/wp-tests-config.php sed -i 's/localhost/127.0.0.1/g' wordpress-develop/wp-tests-config.php + sed -i 's/yourpasswordhere//g' wordpress-develop/wp-tests-config.php - run: mkdir -p *PLUGIN_PATH - checkout: path: *PLUGIN_PATH diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index cad86f58d..01e4b84f5 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -118,7 +118,7 @@ install_test_suite() { sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s//$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php fi From ee7cbe3bd3105ff432ff06cefe048edf6911f079 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Wed, 19 Aug 2020 18:14:27 -0500 Subject: [PATCH 3/3] Restore the password in a sed command in install-wp-tests.sh --- bin/install-wp-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index 01e4b84f5..cad86f58d 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -118,7 +118,7 @@ install_test_suite() { sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s//$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php fi