From 8226d7e533e8c17d95182d02a5f6d1c5c5657a7c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Mar 2011 21:20:40 +0000 Subject: [PATCH] * (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.) --- includes/Wiki.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 884156fd96..bf349cd8bb 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -201,7 +201,7 @@ class MediaWiki { } // Redirect loops, no title in URL, $wgUsePathInfo URLs, and URLs with a variant } else if ( $request->getVal( 'action', 'view' ) == 'view' && !$request->wasPosted() - && ( $request->getVal( 'title' ) === null || $title->getPrefixedDBKey() != $request->getText( 'title' ) ) + && ( $request->getVal( 'title' ) === null || $title->getPrefixedDBKey() != $request->getVal( 'title' ) ) && !count( array_diff( array_keys( $request->getValues() ), array( 'action', 'title' ) ) ) ) { if ( $title->getNamespace() == NS_SPECIAL ) { -- 2.20.1