Revision: 53716
Author:   nikerabbit
Date:     2009-07-24 13:35:24 +0000 (Fri, 24 Jul 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/phase3/includes/WebRequest.php

Modified: trunk/phase3/includes/WebRequest.php
===================================================================
--- trunk/phase3/includes/WebRequest.php        2009-07-24 12:21:41 UTC (rev 
53715)
+++ trunk/phase3/includes/WebRequest.php        2009-07-24 13:35:24 UTC (rev 
53716)
@@ -219,6 +219,10 @@
         * @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];



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to