PHP is so nice to not touch our input data ever (magic_quotes anyone?), except someti...
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 24 Jul 2009 13:35:24 +0000 (13:35 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 24 Jul 2009 13:35:24 +0000 (13:35 +0000)
Work around PHP *feature* to avoid *bugs* elsewhere.

includes/WebRequest.php

index 0928e4d..dbf284a 100644 (file)
@@ -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];