mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Login and Registration: Check if $_GET['login']
is set before using it in wp-login.php
.
This avoids an "Undefined index" PHP notice displayed as part of password reset process if `$_GET['key']` is set, but `$_GET['login']` is not. Props satrancali. Fixes #52980. git-svn-id: https://develop.svn.wordpress.org/trunk@50677 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4286a87407
commit
924343c8fc
@ -807,7 +807,7 @@ switch ( $action ) {
|
||||
list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
||||
$rp_cookie = 'wp-resetpass-' . COOKIEHASH;
|
||||
|
||||
if ( isset( $_GET['key'] ) ) {
|
||||
if ( isset( $_GET['key'] ) && isset( $_GET['login'] ) ) {
|
||||
$value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) );
|
||||
setcookie( $rp_cookie, $value, 0, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user