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