Make WordPress Core

Changeset 59459


Ignore:
Timestamp:
11/25/2024 07:01:57 PM (6 days ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Cast $expired to an integer in wp_validate_auth_cookie().

This resolves an issue where the string $expired value is used both in a comparison and addition with integer values.

Follow-up to [6387], [28424], [45590].

Props justlevine.
See #52217.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r59427 r59459  
    711711        $hmac       = $cookie_elements['hmac'];
    712712        $token      = $cookie_elements['token'];
    713         $expired    = $cookie_elements['expiration'];
    714713        $expiration = $cookie_elements['expiration'];
     714
     715        $expired = (int) $expiration;
    715716
    716717        // Allow a grace period for POST and Ajax requests.
Note: See TracChangeset for help on using the changeset viewer.