diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index cc16e8c8bde37..3dd629fa1990c 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -710,9 +710,10 @@ function wp_validate_auth_cookie( $cookie = '', $scheme = '' ) { $username = $cookie_elements['username']; $hmac = $cookie_elements['hmac']; $token = $cookie_elements['token']; - $expired = $cookie_elements['expiration']; $expiration = $cookie_elements['expiration']; + $expired = (int) $expiration; + // Allow a grace period for POST and Ajax requests. if ( wp_doing_ajax() || 'POST' === $_SERVER['REQUEST_METHOD'] ) { $expired += HOUR_IN_SECONDS;