X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fsecurity_functions.php;h=df3d5686b041a2c92d12329778be45f75d188291;hb=3ea8eee0f8525204eb0fac9ade0a2e4d0fdb7a3c;hp=faeccb51a66856de62fd2b097f5002de317d0381;hpb=c3b4eaf29946349ff058691db2dcb615a5379bb2;p=mailer.git diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index faeccb51a6..df3d5686b0 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -36,7 +36,9 @@ ************************************************************************/ // Run only once this security check/replacement -if (defined('__SECURITY')) return; +if (defined('__SECURITY')) { + return; +} // END - if // Some security stuff... if (strpos($_SERVER['PHP_SELF'], basename(__FILE__)) !== false) { @@ -210,6 +212,18 @@ if (is_array($_GET)) { } // END - foreach } // END - if +// Secure also $_POST data (only simple, no replace) +if (is_array($_POST)) { + // Secure only simple data + foreach ($_POST as $seckey => $secvalue) { + // Is it an array? + if (!is_array($secvalue)) { + // Strip all other out + $_POST[$seckey] = secureString($_POST[$seckey]); + } // END - if + } // END - foreach +} // END - if + // Detect PHP caching detectPhpCaching();