]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/security_functions.php
All, except security block, include()/require() rewritten to own LOAD_INC()/LOAD_INC_...
[mailer.git] / inc / libs / security_functions.php
index 0f34c42e88959f46dccc8be10052ac5b49556668..1f08065de4695decd07ae7f2413e15ded8c5bbf0 100644 (file)
@@ -59,10 +59,6 @@ function secureString ($str, $strip=true) {
 // Run only once this security check/exchange
 if (defined('__SECURITY')) return;
 
-// Fatal messages goes here
-global $FATAL;
-$FATAL = array();
-
 // Runtime/GPC quoting is off now...
 @set_magic_quotes_runtime(false);
 @ini_set('magic_quotes_gpc', false); // This may not work on some systems
@@ -83,11 +79,6 @@ if (!isset($_POST)) {
        $_POST = $GLOBALS['_POST'];
 }
 
-if (!isset($_COOKIE)) {
-       global $_COOKIE;
-       $_COOKIE = $GLOBALS['_COOKIE'];
-}
-
 // Include IP-Filter here
 //require("/usr/share/php/ipfilter.php");
 
@@ -102,7 +93,7 @@ $SEC_CHARS = array(
                "{CLOSE_ANCHOR2}",
                "{SLASH}",
                "{DOT}",
-               '{QUOT}',
+               "{QUOT}",
                "{DOLLAR}",
                "{OPEN_ANCHOR}",
                "{CLOSE_ANCHOR}",
@@ -161,23 +152,6 @@ if (basename($_SERVER['PHP_SELF']) != "install.php") {
                        $_POST[$seckey] = strip_tags($_POST[$seckey]);
                }
        }
-
-       // ... and finally cookies
-       foreach ($_COOKIE as $seckey => $secvalue) {
-               if (is_array($secvalue)) {
-                       // Throw arrays away...
-                       unset($_COOKIE[$seckey]);
-               } else {
-                       // Only variables are allowed (non-array) but we secure them all!
-                       foreach ($SEC_CHARS['from'] as $key => $char) {
-                               // Pass all through
-                               $_COOKIE[$seckey] = str_replace($char  , $SEC_CHARS['to'][$key], $_COOKIE[$seckey]);
-                       }
-
-                       // Strip all other out
-                       $_COOKIE[$seckey] = strip_tags($_COOKIE[$seckey]);
-               }
-       }
 }
 
 // Activate caching or transparent compressing when it is not already done