summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-11-03 16:05:24 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-11-03 16:05:24 +1100
commit7181634dcbeaba0375e91237f285f619e510bf65 (patch)
tree7d421b1ae4c15d5f9ad142675427866af1788fdf /post.php
parent1f1417373f7358b31f102072392c5c7a7a16f2e8 (diff)
Fix for magic quotes
Diffstat (limited to 'post.php')
-rw-r--r--post.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/post.php b/post.php
index 4aceefd9..9016173e 100644
--- a/post.php
+++ b/post.php
@@ -12,6 +12,16 @@
$body = '';
+ // Fix for magic quotes
+ if (get_magic_quotes_gpc()) {
+ function strip_array(&$var) {
+ return is_array($var) ? array_map("strip_array", $var) : stripslashes($var);
+ }
+ strip_array($_SESSION);
+ strip_array($_GET);
+ strip_array($_POST);
+ }
+
if(isset($_POST['post'])) {
if( !isset($_POST['name']) ||
!isset($_POST['email']) ||