Skip to content

Commit e6c5728

Browse files
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
1 parent 43e3ca4 commit e6c5728

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/class-wp-application-passwords.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public static function record_application_password_usage( $user_id, $uuid ) {
203203

204204
// Only record activity once a day.
205205
if ( $password['last_used'] + DAY_IN_SECONDS > time() ) {
206-
continue;
206+
return true;
207207
}
208208

209209
$password['last_used'] = time();

0 commit comments

Comments
 (0)