Fix a few remaining occurances of recovery token

Bug: T354031
Follows-Up: Icf8626799615f8b95f380db9745e1447519b150a
Change-Id: Ief577fb3e6adbf72b374d86df67529c46e4fe83e
This commit is contained in:
Reedy 2024-01-11 14:00:27 +00:00
parent 56b17d4d49
commit b8cb2333dd
3 changed files with 4 additions and 4 deletions

View file

@ -36,7 +36,7 @@ require_once "$IP/maintenance/Maintenance.php";
class UpdateTOTPScratchTokensToArray extends Maintenance {
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

@ -166,9 +166,9 @@ class TOTPEnableForm extends OATHAuthOOUIHTMLForm implements IManageForm {
}
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

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