mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 05:20:01 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/branches/5.6@49740 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
43e3ca4f51
commit
e6c5728b6c
@ -203,7 +203,7 @@ class WP_Application_Passwords {
|
||||
|
||||
// Only record activity once a day.
|
||||
if ( $password['last_used'] + DAY_IN_SECONDS > time() ) {
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
|
||||
$password['last_used'] = time();
|
||||
|
Loading…
x
Reference in New Issue
Block a user