From f45b9edc3559ac543ff37e966497c6629fa964f5 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Wed, 23 Aug 2006 13:50:27 +0000 Subject: [PATCH] strip slashes if needed --- xajax.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xajax.php b/xajax.php index 6ecb949cf5..4e0e3914eb 100644 --- a/xajax.php +++ b/xajax.php @@ -38,6 +38,18 @@ $argList = func_get_args(); $arg0 = array_shift($argList); + if(get_magic_quotes_gpc()) { + foreach($argList as $key => $value) { + if(is_array($value)) { + foreach($argList as $key1 => $value1) { + $argList[$key][$key1] = stripslashes($value1); + } + } else { + $argList[$key] = stripslashes($value); + } + } + } + list($appName, $className, $functionName) = explode('.',$arg0); if(substr($className,0,4) != 'ajax' && $arg0 != 'etemplate.etemplate.process_exec' && substr($functionName,0,4) != 'ajax')