Merge "Fix a few remaining occurances of recovery token"

This commit is contained in:
jenkins-bot 2024-01-11 15:38:09 +00:00 committed by Gerrit Code Review
commit f0f728d342
5 changed files with 6 additions and 6 deletions

View file

@ -42,7 +42,7 @@ require_once "$IP/maintenance/Maintenance.php";
class UpdateTOTPScratchTokensToArray extends LoggedUpdateMaintenance {
public function __construct() {
parent::__construct();
$this->addDescription( 'Script to update TOTP Recovery Tokens to an array' );
$this->addDescription( 'Script to update TOTP Recovery Codes to an array' );
$this->requireExtension( 'OATHAuth' );
}

View file

@ -79,7 +79,7 @@ class ApiOATHValidate extends ApiBase {
$user->pingLimiter( 'badoath' );
LoggerFactory::getInstance( 'authentication' )->info(
'OATHAuth user {user} failed OTP/recovery token from {clientip}',
'OATHAuth user {user} failed OTP token/recovery code from {clientip}',
[
'user' => $user,
'clientip' => $user->getRequest()->getIP(),

View file

@ -112,7 +112,7 @@ class TOTPSecondaryAuthenticationProvider extends AbstractSecondaryAuthenticatio
// Increase rate limit counter for failed request
$user->pingLimiter( 'badoath' );
$this->logger->info( 'OATHAuth user {user} failed OTP/recovery token from {clientip}', [
$this->logger->info( 'OATHAuth user {user} failed OTP token/recovery code from {clientip}', [
'user' => $user->getName(),
'clientip' => $user->getRequest()->getIP(),
] );

View file

@ -181,9 +181,9 @@ class TOTPEnableForm extends OATHAuthOOUIHTMLForm {
}
if ( $key->isScratchToken( $formData['token'] ) ) {
// A scratch/recovery token is not allowed for enrollment
// A recovery code is not allowed for enrollment
LoggerFactory::getInstance( 'authentication' )->info(
'OATHAuth {user} attempted to enable 2FA using a recovery token from {clientip}', [
'OATHAuth {user} attempted to enable 2FA using a recovery code from {clientip}', [
'user' => $this->getUser()->getName(),
'clientip' => $this->getRequest()->getIP(),
]

View file

@ -184,7 +184,7 @@ class TOTPKey implements IAuthKey {
// This is saved below via OATHUserRepository::persist
array_splice( $this->recoveryCodes, $i, 1 );
$logger->info( 'OATHAuth user {user} used a recovery token from {clientip}', [
$logger->info( 'OATHAuth user {user} used a recovery token code {clientip}', [
'user' => $user->getAccount(),
'clientip' => $clientIP,
] );