mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-27 17:50:15 +00:00
Fix a few remaining occurances of recovery token
Bug: T354031 Follows-Up: Icf8626799615f8b95f380db9745e1447519b150a Change-Id: Ief577fb3e6adbf72b374d86df67529c46e4fe83e
This commit is contained in:
parent
56b17d4d49
commit
b8cb2333dd
|
@ -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' );
|
||||
}
|
||||
|
||||
|
|
|
@ -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(),
|
||||
]
|
||||
|
|
|
@ -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,
|
||||
] );
|
||||
|
|
Loading…
Reference in a new issue