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 b9d63097676b9ba9bc4bafa85376d3ee88d4e86d..1bac62864732e6b5f3ff7fa500c49073d5709d01 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 79b1bd15a83780716b6e4673f17d51e4effb441f..22d4b9a00f0a317d0c540d003474935c494f1c16 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
 *