Skip to content

Commit a412372

Browse files
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
1 parent 8175698 commit a412372

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ function wp_login_viewport_meta() {
753753
break;
754754

755755
case 'postpass':
756-
if ( ! array_key_exists( 'post_password', $_POST ) ) {
756+
if ( ! isset( $_POST['post_password'] ) || ! is_string( $_POST['post_password'] ) ) {
757757
wp_safe_redirect( wp_get_referer() );
758758
exit;
759759
}

0 commit comments

Comments
 (0)