From ea7a3af16218cfba55333e15d0eec856d595d59a Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 8 Jan 2019 20:35:34 +0100 Subject: [PATCH] Do not allow pages > 100 --- www/index.php | 6 ++++++ 1 file changed, 6 insertions(+) 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']; -- 2.30.2