This should fix the extra quoting when using magic_quotes_gpc. No need to do this...
authorjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 7 Oct 2002 14:08:50 +0000 (14:08 +0000)
committerjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 7 Oct 2002 14:08:50 +0000 (14:08 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3789 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/global.php
include/validate.php

index b9d6309..1bac628 100644 (file)
@@ -33,15 +33,12 @@ if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
   $_SESSION =& $HTTP_SESSION_VARS;
 }
 
-/* if running with register_globals = 0 and 
-   magic_quotes_gpc then strip the slashes
+/* if running with magic_quotes_gpc then strip the slashes
    from POST and GET global arrays */
 
 if (get_magic_quotes_gpc()) {
-    if (ini_get('register_globals') == 0) {
-        sqstripslashes($_GET);
-        sqstripslashes($_POST);
-    }
+    sqstripslashes($_GET);
+    sqstripslashes($_POST);
 }
 
 /* strip any tags added to the url from PHP_SELF.
index 79b1bd1..22d4b9a 100644 (file)
@@ -40,19 +40,6 @@ require_once(SM_PATH . 'functions/global.php');
 
 is_logged_in();
 
-/* Remove all slashes for form values. */
-if (get_magic_quotes_gpc()) {
-    global $REQUEST_METHOD;
-
-    if ($REQUEST_METHOD == 'POST') {
-        global $HTTP_POST_VARS;
-        RemoveSlashes($HTTP_POST_VARS);
-    } else if ($REQUEST_METHOD == 'GET') {
-        global $HTTP_GET_VARS;
-        RemoveSlashes($HTTP_GET_VARS);
-    }
-}
-
 /**
 * Auto-detection
 *