From: Brian Wolff Date: Fri, 15 Jun 2018 08:19:49 +0000 (+0000) Subject: SECURITY: Fix reauth in Special:ChangeEmail X-Git-Tag: 1.31.2~9 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=062cd9b629b7eccbfa485b218a2048c39ff02572 SECURITY: Fix reauth in Special:ChangeEmail Previously you could bypass reauthentication by directly POSTing to Special:ChangeEmail. Bug: T197279 Change-Id: I674557351e0e91a8105c12ddf6cd30283aac9f7a --- diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index 3d24832be4..1bd42ac0c8 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -55,14 +55,16 @@ class SpecialChangeEmail extends FormSpecialPage { * @param string $par */ function execute( $par ) { - $this->checkLoginSecurityLevel(); - $out = $this->getOutput(); $out->disallowUserJs(); parent::execute( $par ); } + protected function getLoginSecurityLevel() { + return $this->getName(); + } + protected function checkExecutePermissions( User $user ) { if ( !AuthManager::singleton()->allowsPropertyChange( 'emailaddress' ) ) { throw new ErrorPageError( 'changeemail', 'cannotchangeemail' );