diff --git a/wp-admin/maint/repair.php b/wp-admin/maint/repair.php
index 6c9e8fe82a..2399f766be 100644
--- a/wp-admin/maint/repair.php
+++ b/wp-admin/maint/repair.php
@@ -37,7 +37,17 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
);
echo "
define('WP_ALLOW_REPAIR', true);
";
- $default_key = __( 'put your unique phrase here' );
+ $default_keys = array_unique(
+ array(
+ 'put your unique phrase here',
+ /*
+ * translators: This string should only be translated if wp-config-sample.php is localized.
+ * You can check the localized release package or
+ * https://i18n.svn.wordpress.org//branches//dist/wp-config-sample.php
+ */
+ __( 'put your unique phrase here' ),
+ )
+ );
$missing_key = false;
$duplicated_keys = array();
@@ -51,9 +61,11 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
}
}
- // If at least one key uses the default value, consider it duplicated.
- if ( isset( $duplicated_keys[ $default_key ] ) ) {
- $duplicated_keys[ $default_key ] = true;
+ // If at least one key uses a default value, consider it duplicated.
+ foreach ( $default_keys as $default_key ) {
+ if ( isset( $duplicated_keys[ $default_key ] ) ) {
+ $duplicated_keys[ $default_key ] = true;
+ }
}
// Weed out all unique, non-default values.
diff --git a/wp-includes/class-wp-recovery-mode-cookie-service.php b/wp-includes/class-wp-recovery-mode-cookie-service.php
index 5d3be11f6e..a2ee34a723 100644
--- a/wp-includes/class-wp-recovery-mode-cookie-service.php
+++ b/wp-includes/class-wp-recovery-mode-cookie-service.php
@@ -198,7 +198,19 @@ final class WP_Recovery_Mode_Cookie_Service {
* @return string|false The hashed $data, or false on failure.
*/
private function recovery_mode_hash( $data ) {
- if ( ! defined( 'AUTH_KEY' ) || AUTH_KEY === __( 'put your unique phrase here' ) ) {
+ $default_keys = array_unique(
+ array(
+ 'put your unique phrase here',
+ /*
+ * translators: This string should only be translated if wp-config-sample.php is localized.
+ * You can check the localized release package or
+ * https://i18n.svn.wordpress.org//branches//dist/wp-config-sample.php
+ */
+ __( 'put your unique phrase here' ),
+ )
+ );
+
+ if ( ! defined( 'AUTH_KEY' ) || in_array( AUTH_KEY, $default_keys, true ) ) {
$auth_key = get_site_option( 'recovery_mode_auth_key' );
if ( ! $auth_key ) {
@@ -213,7 +225,7 @@ final class WP_Recovery_Mode_Cookie_Service {
$auth_key = AUTH_KEY;
}
- if ( ! defined( 'AUTH_SALT' ) || AUTH_SALT === 'put your unique phrase here' || AUTH_SALT === $auth_key ) {
+ if ( ! defined( 'AUTH_SALT' ) || in_array( AUTH_SALT, $default_keys, true ) || AUTH_SALT === $auth_key ) {
$auth_salt = get_site_option( 'recovery_mode_auth_salt' );
if ( ! $auth_salt ) {
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 7711b36f24..8c33bffb0a 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.1-beta2-54378';
+$wp_version = '6.1-beta2-54379';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.