r88468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88467‎ | r88468 | r88469 >
Date:17:19, 20 May 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 28578) API's parse module should not silently override invalid title inputs
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -77,6 +77,8 @@
7878 * (bug 27790) add query type for querymodules to action=paraminfo
7979 * (bug 28963) add langbacklinks module to api
8080 * (bug 27593) API: add error message when sha1/sha1base36 is invalid
 81+* (bug 28578) API's parse module should not silently override invalid
 82+ title inputs
8183
8284 === Languages updated in 1.19 ===
8385
Index: trunk/phase3/includes/api/ApiParse.php
@@ -155,7 +155,7 @@
156156 $this->text = $text;
157157 $titleObj = Title::newFromText( $title );
158158 if ( !$titleObj ) {
159 - $titleObj = Title::newFromText( 'API' );
 159+ $this->dieUsageMsg( array( 'invalidtitle', $title ) );
160160 }
161161 $wgTitle = $titleObj;
162162
@@ -565,6 +565,7 @@
566566 array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ),
567567 array( 'code' => 'nosuchsection', 'info' => 'There is no section sectionnumber in page' ),
568568 array( 'nosuchpageid' ),
 569+ array( 'invalidtitle', 'title' ),
569570 ) );
570571 }
571572

Sign-offs

UserFlagDate
Bawolfftested18:07, 20 May 2011

Status & tagging log