]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/security_functions.php
cookies rewritten to session
[mailer.git] / inc / libs / security_functions.php
index 73875e3bcb3d9258d69c80934a0cc5435116aac1..79599e4558dd6ace5280466af69a3b894f3ac18d 100644 (file)
@@ -82,10 +82,10 @@ if (!isset($_POST))
        global $_POST;
        $_POST = $GLOBALS['_POST'];
 }
        global $_POST;
        $_POST = $GLOBALS['_POST'];
 }
-if (!isset($_COOKIE))
+if (!isset($_SESSION))
 {
 {
-       global $_COOKIE;
-       $_COOKIE = $GLOBALS['_COOKIE'];
+       global $_SESSION;
+       $_SESSION = $GLOBALS['_COOKIE'];
 }
 
 // Include IP-Filter here
 }
 
 // Include IP-Filter here
@@ -172,12 +172,12 @@ if (basename($_SERVER['PHP_SELF']) != "install.php")
        }
 
        // ... and finally cookies
        }
 
        // ... and finally cookies
-       foreach ($_COOKIE as $seckey=>$secvalue)
+       foreach ($_SESSION as $seckey=>$secvalue)
        {
                if (is_array($secvalue))
                {
                        // Throw arrays away...
        {
                if (is_array($secvalue))
                {
                        // Throw arrays away...
-                       unset($_COOKIE[$seckey]);
+                       unset($_SESSION[$seckey]);
                }
                 else
                {
                }
                 else
                {
@@ -185,11 +185,11 @@ if (basename($_SERVER['PHP_SELF']) != "install.php")
                        foreach ($SEC_CHARS['from'] as $key=>$char)
                        {
                                // Pass all through
                        foreach ($SEC_CHARS['from'] as $key=>$char)
                        {
                                // Pass all through
-                               $_COOKIE[$seckey] = str_replace($char  , $SEC_CHARS['to'][$key], $_COOKIE[$seckey]);
+                               $_SESSION[$seckey] = str_replace($char  , $SEC_CHARS['to'][$key], $_SESSION[$seckey]);
                        }
 
                        // Strip all other out
                        }
 
                        // Strip all other out
-                       $_COOKIE[$seckey] = strip_tags($_COOKIE[$seckey]);
+                       $_SESSION[$seckey] = strip_tags($_SESSION[$seckey]);
                }
        }
 }
                }
        }
 }