r83046 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83045‎ | r83046 | r83047 >
Date:21:20, 1 March 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
* (bug 27761) Fix regression: pages with Esperanto titles containing convertible character sequences became unreachable

Fixes regression from r70871 -- a comparison originally made against the raw GET 'title' variable was changed to use WebRequest::getText() instead, which performs character conversion. This caused infinite redirect loops for titles containing convertible forms such as "ux", which in a recodable field would be round-tripped via "uxx".
This fix changes the comparison to use WebRequest::getVal(), restoring the original direct comparison and avoiding the redirect loops.

(Another nice reminder that this old system with the pseudo charset conversion is obsolete -- it should be replaced with a more modern browser-based input conversion that can apply to all text input fields.)
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -201,7 +201,7 @@
202202 }
203203 // Redirect loops, no title in URL, $wgUsePathInfo URLs, and URLs with a variant
204204 } else if ( $request->getVal( 'action', 'view' ) == 'view' && !$request->wasPosted()
205 - && ( $request->getVal( 'title' ) === null || $title->getPrefixedDBKey() != $request->getText( 'title' ) )
 205+ && ( $request->getVal( 'title' ) === null || $title->getPrefixedDBKey() != $request->getVal( 'title' ) )
206206 && !count( array_diff( array_keys( $request->getValues() ), array( 'action', 'title' ) ) ) )
207207 {
208208 if ( $title->getNamespace() == NS_SPECIAL ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r830491.17wmf1: MFT r83046catrope21:38, 1 March 2011
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70871Remove raw $_GET usage held over from days before WebRequest existed, was int...demon12:15, 11 August 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   21:22, 1 March 2011

Needs merge to 1.17wmf1 and deployment to resolve the bug as it currently affects eo.wikipedia.org and friends.

Status & tagging log