From 837a3e1988740ec84532db391b36b4d754afd2be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 24 Jul 2009 13:35:24 +0000 Subject: [PATCH] PHP is so nice to not touch our input data ever (magic_quotes anyone?), except sometimes: http://us2.php.net/variables.external#language.variables.external.dot-in-names Work around PHP *feature* to avoid *bugs* elsewhere. --- includes/WebRequest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 0928e4d51d..dbf284a925 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -219,6 +219,10 @@ class WebRequest { * @private */ function getGPCVal( $arr, $name, $default ) { + # PHP is so nice to not touch input data, except sometimes: + # http://us2.php.net/variables.external#language.variables.external.dot-in-names + # Work around PHP *feature* to avoid *bugs* elsewhere. + $name = strtr( $name, '.', '_' ); if( isset( $arr[$name] ) ) { global $wgContLang; $data = $arr[$name]; -- 2.20.1