From c8e8fc1dba87abf3bf712abf7b5bf8e04c2f4d24 Mon Sep 17 00:00:00 2001 From: short <> Date: Thu, 21 Mar 2002 21:12:13 +0000 Subject: [PATCH 1/1] Implemented workaround for clients passing arguments with "&" +function fixampvars() --- common.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common.php b/common.php index 69ffa30..11ceb6b 100644 --- a/common.php +++ b/common.php @@ -2,6 +2,7 @@ error_reporting(E_ALL); setlocale(LC_ALL,"cs_CZ.iso-8859-2"); + fixampvars(); include("config.php"); @@ -29,6 +30,19 @@ $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=""; -- 1.8.3.1