Make WordPress Core

Changeset 49740


Ignore:
Timestamp:
12/03/2020 05:21:48 PM (6 years ago)
Author:
SergeyBiryukov
Message:

App Passwords: Return true when rate limiting a password's last used time.

Previously we returned a WP_Error instance saying that the password was not found which is inaccurate.

Props dlh.
Reviewed by TimothyBlynJacobs, SergeyBiryukov.
Merges [49739] to the 5.6 branch.
Fixes #51922.

Location:
branches/5.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.6

  • branches/5.6/src/wp-includes/class-wp-application-passwords.php

    r49276 r49740  
    204204                        // Only record activity once a day.
    205205                        if ( $password['last_used'] + DAY_IN_SECONDS > time() ) {
    206                                 continue;
     206                                return true;
    207207                        }
    208208
Note: See TracChangeset for help on using the changeset viewer.