From: Andrew Dolgov Date: Sun, 12 Jul 2015 10:18:03 +0000 (+0300) Subject: api: getHeadlines: cast feed_it to int if needed X-Git-Tag: 16.3~232^2~13 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=96ac72bc12ab0f5a79c48b2542d4a20088d87f0a;p=tt-rss.git api: getHeadlines: cast feed_it to int if needed --- diff --git a/classes/api.php b/classes/api.php index cbb4720c..2691625c 100644 --- a/classes/api.php +++ b/classes/api.php @@ -184,6 +184,8 @@ class API extends Handler { $feed_id = $this->dbh->escape_string($_REQUEST["feed_id"]); if ($feed_id != "") { + if (is_numeric($feed_id)) $feed_id = (int) $feed_id; + $limit = (int)$this->dbh->escape_string($_REQUEST["limit"]); if (!$limit || $limit >= 200) $limit = 200;