Commit 85928dc39a for wordpress.org
commit 85928dc39ad1a9fdb20ff4781edb0620682d30a6
Author: desrosj <desrosj@git.wordpress.org>
Date: Wed Nov 20 01:39:19 2024 +0000
Options, Meta APIs: Ensure duplicate salts are properly flagged.
Improvements were made in 6.7 to ensure that salts stored in the database were primed more efficiently.
The logic added to accomplish this suffered from an edge case where array indexes were unexpectedly missing when `wp_salt()` was called recursively.
Follow up to [58837].
Props juliobox, ankitkumarshah, dilipbheda, johnbillion, joemcgill, desrosj.
Fixes #62424.
Built from https://develop.svn.wordpress.org/trunk@59427
git-svn-id: http://core.svn.wordpress.org/trunk@58813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index da637ebbcf..cc16e8c8bd 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -2479,16 +2479,7 @@ if ( ! function_exists( 'wp_salt' ) ) :
static $duplicated_keys;
if ( null === $duplicated_keys ) {
- $duplicated_keys = array(
- 'put your unique phrase here' => true,
- );
-
- /*
- * 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/<locale code>/branches/<wp version>/dist/wp-config-sample.php
- */
- $duplicated_keys[ __( 'put your unique phrase here' ) ] = true;
+ $duplicated_keys = array();
foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) {
foreach ( array( 'KEY', 'SALT' ) as $second ) {
@@ -2499,6 +2490,15 @@ if ( ! function_exists( 'wp_salt' ) ) :
$duplicated_keys[ $value ] = isset( $duplicated_keys[ $value ] );
}
}
+
+ $duplicated_keys['put your unique phrase here'] = true;
+
+ /*
+ * 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/<locale code>/branches/<wp version>/dist/wp-config-sample.php
+ */
+ $duplicated_keys[ __( 'put your unique phrase here' ) ] = true;
}
/*
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 92916ec0e8..4a9de2c060 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.8-alpha-59426';
+$wp_version = '6.8-alpha-59427';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.