mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 23:41:38 +01:00
Users: Adjust the initialization of the $duplicated_keys
array in wp_salt()
.
This avoids an endless loop if `get_current_user_id()` is used in a callback attached to the `gettext` filter. With the translated phrase moved into a separate assignment, the function succeeds in setting the static `$duplicated_keys` array once and no longer goes into this code section on subsequent calls. Follow-up to [54249]. Props adityaarora010196, SergeyBiryukov. Fixes #57121. Built from https://develop.svn.wordpress.org/trunk@55433 git-svn-id: http://core.svn.wordpress.org/trunk@54966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
933bb3999b
commit
0449c238bd
@ -2418,13 +2418,15 @@ if ( ! function_exists( 'wp_salt' ) ) :
|
|||||||
if ( null === $duplicated_keys ) {
|
if ( null === $duplicated_keys ) {
|
||||||
$duplicated_keys = array(
|
$duplicated_keys = array(
|
||||||
'put your unique phrase here' => true,
|
'put your unique phrase here' => true,
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* translators: This string should only be translated if wp-config-sample.php is localized.
|
* translators: This string should only be translated if wp-config-sample.php is localized.
|
||||||
* You can check the localized release package or
|
* You can check the localized release package or
|
||||||
* https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
|
* https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
|
||||||
*/
|
*/
|
||||||
__( 'put your unique phrase here' ) => true,
|
$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 ) {
|
||||||
if ( ! defined( "{$first}_{$second}" ) ) {
|
if ( ! defined( "{$first}_{$second}" ) ) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.2-beta3-55432';
|
$wp_version = '6.2-beta3-55433';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user