MarkAHershberger has uploaded a new change for review.
https://gerrit.wikimedia.org/r/62608
Change subject: Handle invalid titles on ProtectedPages and ProtectedTitles
......................................................................
Handle invalid titles on ProtectedPages and ProtectedTitles
bug: 46493
Change-Id: Iaa6e3378c185c53b77a4ede0ddfdfed8c6a2268a
---
M RELEASE-NOTES-1.19
M includes/specials/SpecialProtectedpages.php
M includes/specials/SpecialProtectedtitles.php
3 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/08/62608/1
diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19
index a61c237..6e6c1b1 100644
--- a/RELEASE-NOTES-1.19
+++ b/RELEASE-NOTES-1.19
@@ -3,6 +3,14 @@
Security reminder: MediaWiki does not require PHP's register_globals
setting since version 1.2.0. If you have it on, turn it '''off''' if you can.
+== MediaWiki 1.19.7 ==
+
+This is not yet a MediaWiki release
+
+=== Changes since 1.19.6 ===
+
+* (bug 46493) Handle invalid titles on ProtectedPages and ProtectedTitles
+
== MediaWiki 1.19.6 ==
This is a security and maintenance release of the MediaWiki 1.19 branch
diff --git a/includes/specials/SpecialProtectedpages.php
b/includes/specials/SpecialProtectedpages.php
index eec974f..0f16803 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -84,6 +84,12 @@
}
$title = Title::makeTitleSafe( $row->page_namespace,
$row->page_title );
+ if( !$title ) {
+ return Html::rawElement( 'li', array(),
+ Html::element( 'span', array( 'class' =>
'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
$this->getContext(), $row->page_namespace, $row->page_title ) ) ) . "\n";
+ }
+
$link = Linker::link( $title );
$description_items = array ();
diff --git a/includes/specials/SpecialProtectedtitles.php
b/includes/specials/SpecialProtectedtitles.php
index 982feb6..70d8703 100644
--- a/includes/specials/SpecialProtectedtitles.php
+++ b/includes/specials/SpecialProtectedtitles.php
@@ -82,6 +82,12 @@
}
$title = Title::makeTitleSafe( $row->pt_namespace,
$row->pt_title );
+ if( !$title ) {
+ return Html::rawElement( 'li', array(),
+ Html::element( 'span', array( 'class' =>
'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
$this->getContext(), $row->pt_namespace, $row->pt_title ) ) ) . "\n";
+ }
+
$link = Linker::link( $title );
$description_items = array ();
--
To view, visit https://gerrit.wikimedia.org/r/62608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa6e3378c185c53b77a4ede0ddfdfed8c6a2268a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: MarkAHershberger <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits