From 7b263cc1312121f3da0630ffb3dc959fd45cdaa4 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 27 Jun 2005 02:04:44 +0000 Subject: [PATCH] * Convert non-UTF-8 URL parameters even if referer is local --- RELEASE-NOTES | 2 ++ includes/WebRequest.php | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 71f3178e92..760f396ed7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -364,6 +364,7 @@ Various bugfixes, small features, and a few experimental things: * (bug 2520) Don't show enotif options when disabled == Changes since 1.5beta1 == + * (bug 2531) Changed the interwiki name for sh (Serbocroatian) to Srpskohrvatski/Српскохрватски (was Српскохрватски (Srbskohrvatski)) * Nonzero return code for command-line scripts on wfDebugDieBacktrace() @@ -374,6 +375,7 @@ Various bugfixes, small features, and a few experimental things: * (bug 2541) Fix unprotect tab * (bug 1242) category list now show on edit page * Skip sidebar entries where link text is '-' +* Convert non-UTF-8 URL parameters even if referer is local === Caveats === diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 4de082004e..7e3a583040 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -111,12 +111,8 @@ class WebRequest { if( isset( $arr[$name] ) ) { global $wgServer, $wgContLang; $data = $arr[$name]; - if( isset( $_GET[$name] ) && - !is_array( $data ) && - ( empty( $_SERVER['HTTP_REFERER'] ) || - strncmp($wgServer, $_SERVER['HTTP_REFERER'], strlen( $wgServer ) ) ) ) { - # For links that came from outside, check for alternate/legacy - # character encoding. + if( isset( $_GET[$name] ) && !is_array( $data ) ) { + # Check for alternate/legacy character encoding. if( isset( $wgContLang ) ) { $data = $wgContLang->checkTitleEncoding( $data ); } -- 2.20.1