From 06a1258a9a86093770b9342442f2ada95a788cdd Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 10 Feb 2016 19:29:00 -0800 Subject: put a sane lower time limit on content search for public feed requests --- include/items.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 5361a5fde..7fed486a6 100755 --- a/include/items.php +++ b/include/items.php @@ -552,6 +552,12 @@ function get_public_feed($channel, $params) { $params['top'] = ((x($params,'top')) ? intval($params['top']) : 0); $params['cat'] = ((x($params,'cat')) ? $params['cat'] : ''); + + // put a sane lower limit on feed requests if not specified + + if($params['begin'] === NULL_DATE) + $params['begin'] = datetime_convert('UTC','UTC','now - 1 month'); + switch($params['type']) { case 'json': header("Content-type: application/atom+json"); -- cgit v1.2.3