mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 00:05:24 +00:00
Ask user to reauthenticate before changing 2FA method
Re-auth period set to 60s Bug: T218211 Change-Id: I17a84b8e60da2ada35c6b86cf6b66d75fb3f13fe
This commit is contained in:
parent
475d8145e9
commit
a244d95224
|
@ -140,6 +140,9 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"ReauthenticateTime": {
|
||||
"oathauth-enable": 60
|
||||
},
|
||||
"load_composer_autoloader": true,
|
||||
"LogTypes": [ "oath" ],
|
||||
"LogNames": {
|
||||
|
|
|
@ -84,12 +84,12 @@ class OATHManage extends SpecialPage {
|
|||
* @return void
|
||||
*/
|
||||
public function execute( $subPage ) {
|
||||
parent::execute( $subPage );
|
||||
|
||||
$this->getOutput()->enableOOUI();
|
||||
$this->setAction();
|
||||
$this->setModule();
|
||||
|
||||
parent::execute( $subPage );
|
||||
|
||||
if ( $this->requestedModule instanceof IModule ) {
|
||||
// Performing an action on a requested module
|
||||
$this->clearPage();
|
||||
|
@ -127,6 +127,11 @@ class OATHManage extends SpecialPage {
|
|||
// No enabled module and cannot enable - nothing to do
|
||||
$this->displayRestrictionError();
|
||||
}
|
||||
|
||||
if ( $this->action === static::ACTION_ENABLE ) {
|
||||
// Trying to change the 2FA method (one is already enabled)
|
||||
$this->checkLoginSecurityLevel( 'oathauth-enable' );
|
||||
}
|
||||
}
|
||||
|
||||
private function setAction() {
|
||||
|
|
Loading…
Reference in a new issue