Browse Source

fixed get_magic_quotes_gpc with force_std_separator

Nicolas Cannasse 17 years ago
parent
commit
ded11e5318
1 changed files with 4 additions and 1 deletions
  1. 4 1
      std/php/Web.hx

+ 4 - 1
std/php/Web.hx

@@ -11,7 +11,10 @@ class Web {
 	**/
 	public static function getParams() {
 		#if force_std_separator
-		var h = Lib.hashOfAssociativeArray(untyped __php__("$_POST"));
+		var a : Array<String> = untyped __php__("$_POST");
+		if(untyped __call__("get_magic_quotes_gpc"))
+			untyped __php__("foreach($a as $k => $v) $a[$k] = stripslashes($v)");
+		var h = Lib.hashOfAssociativeArray(a);
 		for( p in getParamsString().split(";") ) {
 			var a = p.split("=");
 			var n = a.shift();