Make Special:Version escape extension names that aren't links
authorBrian Wolff <bawolff+wn@gmail.com>
Sun, 17 Feb 2019 11:09:45 +0000 (11:09 +0000)
committerKrinkle <krinklemail@gmail.com>
Sun, 7 Apr 2019 17:06:19 +0000 (17:06 +0000)
This is to make phan-taint-check happy. Technically this is
a breaking change, but I am unaware of any extensions actually
having their names be arbitrary html, and support for this
is not documented anywhere.

Bug: T216348
Change-Id: I065d7e57f36e079e0b02180379e2df1f8535f3a8

RELEASE-NOTES-1.33
includes/specials/SpecialVersion.php

index 9c5081c..419560d 100644 (file)
@@ -436,6 +436,8 @@ because of Phabricator reports.
   insertions into links tables.
 * Category::newFromID( $id )->getID() will now return $id without any
   validation, to avoid a mostly unnecessary DB query.
+* On Special:Version, the name for an extension can no longer be arbitrary
+  html when no link is specified.
 
 == Compatibility ==
 MediaWiki 1.33 requires PHP 7.0.13 or later. Although HHVM 3.18.5 or later is
index 2ad0def..391d9ab 100644 (file)
@@ -703,7 +703,7 @@ class SpecialVersion extends SpecialPage {
                                [ 'class' => 'mw-version-ext-name' ]
                        );
                } else {
-                       $extensionNameLink = $extensionName;
+                       $extensionNameLink = htmlspecialchars( $extensionName );
                }
 
                // ... and the version information