Upgrade/Install: Avoid creating nonce during installation.
This avoids a "Table `wp_options` doesn't exist" database error when trying to create a nonce for password reset button. When installing and using database-saved salts, `wp_create_nonce()` causes database errors as `wp_salt()` attempts to insert into the not-yet-created options table. Since authentication is not available during installation, we can safely skip creating a nonce. Follow-up to [39684], [50129]. Props schlessera, swissspidy, sanketchodavadiya, hellofromTonya, SergeyBiryukov. Fixes #53830. Built from https://develop.svn.wordpress.org/trunk@51525 git-svn-id: http://core.svn.wordpress.org/trunk@51136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9e33977bc9
commit
47fc56d650
|
@ -1097,7 +1097,7 @@ function wp_default_scripts( $scripts ) {
|
|||
'userProfileL10n',
|
||||
array(
|
||||
'user_id' => $user_id,
|
||||
'nonce' => wp_create_nonce( 'reset-password-for-' . $user_id ),
|
||||
'nonce' => ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'reset-password-for-' . $user_id ),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51524';
|
||||
$wp_version = '5.9-alpha-51525';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue