From 3b7e4338572bf9833afc3e1c824dd4d812094b41 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 3 May 2024 14:30:56 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@58093 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-login.php b/src/wp-login.php index bd4568a4690b5..18811aae57b74 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -753,7 +753,7 @@ function wp_login_viewport_meta() { 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; }