]> git.wh0rd.org - tt-rss.git/commitdiff
prevent frontend updating of feeds on view if open_basedir is set to prevent plugins...
authorAndrew Dolgov <noreply@fakecake.org>
Sat, 23 Jan 2016 09:13:03 +0000 (12:13 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sat, 23 Jan 2016 09:13:03 +0000 (12:13 +0300)
classes/api.php
classes/feeds.php

index c3ea627fd88cd51d6cfadc8b0591838217fdfda3..9be04cff93cd0fb882b102ef2e38009587ec1dd2 100644 (file)
@@ -416,7 +416,9 @@ class API extends Handler {
 
                $feed_id = (int) $this->dbh->escape_string($_REQUEST["feed_id"]);
 
-               update_rss_feed($feed_id, true);
+               if (!ini_get("open_basedir")) {
+                       update_rss_feed($feed_id, true);
+               }
 
                $this->wrap(self::STATUS_OK, array("status" => "OK"));
        }
index eff66dda607af47836becdf90f24977d0e36fe48..cb1b032d160428eaa2b4ce0844e34fc3bea9e25f 100755 (executable)
@@ -166,7 +166,7 @@ class Feeds extends Handler_Protected {
 
                $method_split = explode(":", $method);
 
-               if ($method == "ForceUpdate" && $feed > 0 && is_numeric($feed)) {
+               if ($method == "ForceUpdate" && $feed > 0 && is_numeric($feed) && !ini_get("open_basedir")) {
                        // Update the feed if required with some basic flood control
 
                        $result = $this->dbh->query(