]> git.wh0rd.org Git - tt-rss.git/commitdiff
sanitize input in label-editor subops
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 19 May 2006 03:13:32 +0000 (04:13 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 19 May 2006 03:13:32 +0000 (04:13 +0100)
backend.php

index 4d855ceadd20b9830b7f56cfe05e739659db639b..bb418044937bdffa97e74d80e223838377465daa 100644 (file)
 
                if ($subop == "editSave") {
 
-                       $regexp = db_escape_string($_GET["r"]);
-                       $match = db_escape_string($_GET["m"]);
+                       $regexp = db_escape_string(trim($_GET["r"]));
+                       $match = db_escape_string(trim($_GET["m"]));
                        $filter_id = db_escape_string($_GET["id"]);
                        $feed_id = db_escape_string($_GET["fid"]);
                        $action_id = db_escape_string($_GET["aid"]); 
 
                if ($subop == "test") {
 
-                       $expr = $_GET["expr"];
-                       $descr = $_GET["descr"];
+                       $expr = trim($_GET["expr"]);
+                       $descr = trim($_GET["descr"]);
 
                        print "<div id=\"infoBoxTitle\">Test label: $descr</div>";
 
 
                if ($subop == "editSave") {
 
-                       $sql_exp = $_GET["s"];
-                       $descr = $_GET["d"];
+                       $sql_exp = trim($_GET["s"]);
+                       $descr = trim($_GET["d"]);
                        $label_id = db_escape_string($_GET["id"]);
                        
 //                     print "$sql_exp : $descr : $label_id";