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
This commit is contained in:
parent
41226f1164
commit
85928dc39a
|
@ -2479,16 +2479,7 @@ if ( ! function_exists( 'wp_salt' ) ) :
|
||||||
|
|
||||||
static $duplicated_keys;
|
static $duplicated_keys;
|
||||||
if ( null === $duplicated_keys ) {
|
if ( null === $duplicated_keys ) {
|
||||||
$duplicated_keys = array(
|
$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;
|
|
||||||
|
|
||||||
foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) {
|
foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) {
|
||||||
foreach ( array( 'KEY', 'SALT' ) as $second ) {
|
foreach ( array( 'KEY', 'SALT' ) as $second ) {
|
||||||
|
@ -2499,6 +2490,15 @@ if ( ! function_exists( 'wp_salt' ) ) :
|
||||||
$duplicated_keys[ $value ] = isset( $duplicated_keys[ $value ] );
|
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue