api: getHeadlines: cast feed_it to int if needed

This commit is contained in:
Andrew Dolgov 2015-07-12 13:18:03 +03:00
parent b0ce3d33c3
commit 96ac72bc12
1 changed files with 2 additions and 0 deletions

View File

@ -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;