mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-27 09:40:28 +00:00
Merge "Fix a few remaining occurances of recovery token"
This commit is contained in:
commit
f0f728d342
|
@ -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' );
|
||||
}
|
||||
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
] );
|
||||
|
|
|
@ -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(),
|
||||
]
|
||||
|
|
|
@ -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,
|
||||
] );
|
||||
|
|
Loading…
Reference in a new issue