From: Niklas Laxström Date: Fri, 24 Jul 2009 13:35:24 +0000 (+0000) Subject: PHP is so nice to not touch our input data ever (magic_quotes anyone?), except someti... X-Git-Tag: 1.31.0-rc.0~40744 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=837a3e1988740ec84532db391b36b4d754afd2be;p=lhc%2Fweb%2Fwiklou.git PHP is so nice to not touch our input data ever (magic_quotes anyone?), except sometimes: us2.php.net/variables.external#language.variables.external.dot-in-names Work around PHP *feature* to avoid *bugs* elsewhere. --- 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];