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.
Fixes #51922.

Built from https://develop.svn.wordpress.org/trunk@49739


git-svn-id: http://core.svn.wordpress.org/trunk@49462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
TimothyBlynJacobs 2020-12-03 16:30:06 +00:00
parent fc3a155f6a
commit 4dd08e20b8
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.7-alpha-49737';
$wp_version = '5.7-alpha-49739';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.