]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc rpc security bugfixes
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 19 Nov 2005 17:52:40 +0000 (18:52 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 19 Nov 2005 17:52:40 +0000 (18:52 +0100)
backend.php

index 5a65421ccaeb01dbb4e8763130dc43bcbaff2a30..afa04fe161f729b220924d4148efeeebe39271d9 100644 (file)
                                title = '$feed_title', feed_url = '$feed_link',
                                update_interval = '$upd_intl',
                                purge_interval = '$purge_intl' 
-                               WHERE id = '$feed_id'");                        
+                               WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);                    
 
                }
 
                                $ids = split(",", $_GET["ids"]);
 
                                foreach ($ids as $id) {
-                                       db_query($link, "DELETE FROM ttrss_feeds WHERE id = '$id'");
+                                       db_query($link, "DELETE FROM ttrss_feeds 
+                                               WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]);
 
                                        $icons_dir = ICONS_DIR;
                                        
                                        "INSERT INTO ttrss_feeds (owner_uid,feed_url,title) VALUES ('".$_SESSION["uid"]."', '$feed_link', '')");
 
                                $result = db_query($link,
-                                       "SELECT id FROM ttrss_feeds WHERE feed_url = '$feed_link'");
+                                       "SELECT id FROM ttrss_feeds WHERE feed_url = '$feed_link' AND owner_uid = " . $_SESSION["uid"]);
 
                                $feed_id = db_fetch_result($result, 0, "id");