From: Christian Weiske Date: Tue, 8 Jan 2019 19:35:34 +0000 (+0100) Subject: Do not allow pages > 100 X-Git-Url: https://git.cweiske.de/phinde.git/commitdiff_plain/ea7a3af16218cfba55333e15d0eec856d595d59a?hp=1979dce952f8274c18ed7f662318f27aadf6c01a Do not allow pages > 100 --- diff --git a/www/index.php b/www/index.php index da7b27c..7c4904b 100644 --- a/www/index.php +++ b/www/index.php @@ -15,6 +15,12 @@ if (isset($_GET['page'])) { } //PEAR Pager begins at 1 $page = (int)$_GET['page'] - 1; + + if ($page >= 100) { + //Elasticsearch by default only allows 100 pages + // we do not want exceptions in our logs + throw new Exception_Input('List page is too large'); + } } $perPage = 10;//$GLOBALS['phinde']['perPage'];