X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fsecurity_functions.php;h=190a369e5abebcde7f3e28004fbfb23aba3a7d41;hb=4c1b82f6fa4d79dcbe9e747bceb675759206b4a8;hp=8c032b722af6bf1c0ae399a9125e7d755e044275;hpb=53cc10802e09e149942cc5cdc5909e1374908836;p=mailer.git diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index 8c032b722a..190a369e5a 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -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 @@ -89,14 +89,14 @@ if (!isset($_SESSION)) global $SEC_CHARS, $URL_CHARS; $SEC_CHARS = array( // The chars we are looking for... - 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", "{--", "--}", "%", ";", "[", "]", ":", "--"), + 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ";", "[", "]", ":", "--"), // ... and we will replace to. 'to' => array( "{OPEN_ANCHOR2}", "{CLOSE_ANCHOR2}", "{SLASH}", "{DOT}", - "{QUOT}", + '{QUOT}', "{DOLLAR}", "{OPEN_ANCHOR}", "{CLOSE_ANCHOR}", @@ -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]); } } }