]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/security_functions.php
Way more usage of EL code:
[mailer.git] / inc / libs / security_functions.php
index faeccb51a66856de62fd2b097f5002de317d0381..df3d5686b041a2c92d12329778be45f75d188291 100644 (file)
@@ -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();