]> git.wh0rd.org - tt-rss.git/commitdiff
disable magic quotes if needed
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 19 May 2007 13:47:37 +0000 (14:47 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 19 May 2007 13:47:37 +0000 (14:47 +0100)
backend.php

index 3b5c071c4a2c7218d035cf72d142c4cbf39482b3..189e89e31caf061173affbc67f8bbf53ab6a837f 100644 (file)
@@ -1,6 +1,15 @@
 <?php
        error_reporting(E_ERROR | E_WARNING | E_PARSE);
 
+       /* remove ill effects of magic quotes */
+
+       if (get_magic_quotes_gpc()) {
+               $_GET = array_map('stripslashes', $_GET);
+               $_POST = array_map('stripslashes', $_POST);
+               $_REQUEST = array_map('stripslashes', $_REQUEST);
+               $_COOKIE = array_map('stripslashes', $_COOKIE);
+       }
+
        require_once "sessions.php";
        require_once "modules/backend-rpc.php";