Implemented workaround for clients passing arguments with "&"
authorshort <>
Thu, 21 Mar 2002 21:12:13 +0000 (21:12 +0000)
committershort <>
Thu, 21 Mar 2002 21:12:13 +0000 (21:12 +0000)
 +function fixampvars()

common.php

index 69ffa30..11ceb6b 100644 (file)
@@ -2,6 +2,7 @@
 
        error_reporting(E_ALL);
        setlocale(LC_ALL,"cs_CZ.iso-8859-2");
+       fixampvars();
 
        include("config.php");
 
        $have_style=!isset($mozilla_major) || $mozilla_major!=4;
        $have_css=true; // doesn't hurt anybody AFAIK
 
+function fixampvars()
+{
+       $ars=array("HTTP_GET_VARS","HTTP_POST_VARS");
+       foreach ($ars as $ar) {
+               foreach ($GLOBALS[$ar] as $key=>$val) {
+                       if (substr($key,0,4)!="amp;")
+                               continue;
+                       unset($GLOBALS[$ar][$key]);
+                       $GLOBALS[$ar][substr($key,4)]=$val;
+                       }
+               }
+}
+
 function addpercents($url)
 {
        $r=$c="";