Login and Registration: Check that post_password is a string in wp-login.php.

This prevents a fatal error if an array is passed instead.

Follow-up to [19925], [34909], [58023].

Props dd32, swissspidy.
Fixes #61136.
Built from https://develop.svn.wordpress.org/trunk@58093


git-svn-id: http://core.svn.wordpress.org/trunk@57558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-05-03 14:32:17 +00:00
parent f878bb85e5
commit 0888e755d7
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-58092';
$wp_version = '6.6-alpha-58093';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -753,7 +753,7 @@ switch ( $action ) {
break;
case 'postpass':
if ( ! array_key_exists( 'post_password', $_POST ) ) {
if ( ! isset( $_POST['post_password'] ) || ! is_string( $_POST['post_password'] ) ) {
wp_safe_redirect( wp_get_referer() );
exit;
}