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.
Built from https://develop.svn.wordpress.org/branches/5.6@49740


git-svn-id: http://core.svn.wordpress.org/branches/5.6@49463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-12-03 17:23:05 +00:00
parent b152d93471
commit 65ef0dcbb9
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-RC2-49738';
$wp_version = '5.6-RC2-49740';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.