diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index ef2821fb2a..d5a680737b 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -608,13 +608,15 @@ function wp_validate_auth_cookie($cookie = '', $scheme = '') { return false; } - extract($cookie_elements, EXTR_OVERWRITE); - - $expired = $expiration; + $scheme = $cookie_elements['scheme']; + $username = $cookie_elements['username']; + $hmac = $cookie_elements['hmac']; + $expired = $expiration = $cookie_elements['expiration']; // Allow a grace period for POST and AJAX requests - if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) + if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) { $expired += HOUR_IN_SECONDS; + } // Quick check to see if an honest cookie has expired if ( $expired < time() ) { @@ -659,8 +661,9 @@ function wp_validate_auth_cookie($cookie = '', $scheme = '') { return false; } - if ( $expiration < time() ) // AJAX/POST grace period set above + if ( $expiration < time() ) {// AJAX/POST grace period set above $GLOBALS['login_grace_period'] = 1; + } /** * Fires once an authentication cookie has been validated.