hrk / tt-rss-newsplus-plugin

Tiny-Tiny-RSS plugin to allow two way synchronization with the News+ Android app
GNU General Public License v3.0
51 stars 22 forks source link

Limit defaults to unlimited rather than 20 #7

Open JKingweb opened 6 years ago

JKingweb commented 6 years ago

Line 47 reads as follows:

$limit = (int) db_escape_string($_REQUEST["limit"]);

This results in null (as well as various invalid input) being passed along as zero (no limit). The following lines would have the desired result:

$limit = db_escape_string($_REQUEST["limit"]);
$limit = (int) (is_numeric($limit) ? $limit : 20);

Alternatively (and I think this is the better option), this could instead be considered a documentation bug, and the default should officially be unlimited, with the documentation as well as line 64 adjusted accordingly.