SECURITY: Do not allow user scripts on Special:PasswordReset
authorAmir Sarabadani <Ladsgroup@gmail.com>
Sat, 7 Dec 2019 22:36:42 +0000 (23:36 +0100)
committerSBassett <sbassett@wikimedia.org>
Mon, 9 Dec 2019 22:50:04 +0000 (22:50 +0000)
Bug: T192134
Change-Id: If5e91452f2e569476626bcf650ba4efaa122952c

includes/specials/SpecialPasswordReset.php

index c1d30ee..63490e4 100644 (file)
@@ -74,6 +74,15 @@ class SpecialPasswordReset extends FormSpecialPage {
                parent::checkExecutePermissions( $user );
        }
 
+       /**
+        * @param string $par
+        */
+       public function execute( $par ) {
+               $out = $this->getOutput();
+               $out->disallowUserJs();
+               parent::execute( $par );
+       }
+
        protected function getFormFields() {
                $resetRoutes = $this->getConfig()->get( 'PasswordResetRoutes' );
                $a = [];