X-Git-Url: https://git.cweiske.de/phinde.git/blobdiff_plain/f98e891b454e5677bdf61f476e366b01af713b50..aee0575ffde686767da37561d182dac832e0562f:/www/index.php diff --git a/www/index.php b/www/index.php index 8bd900c..c1acfdf 100644 --- a/www/index.php +++ b/www/index.php @@ -15,6 +15,14 @@ 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 + header('HTTP/1.0 400 Bad Request'); + echo "List page number is too large\n"; + exit(1); + } } $perPage = 10;//$GLOBALS['phinde']['perPage']; @@ -98,7 +106,7 @@ $timeEnd = microtime(true); $pager = new Html_Pager( $res->hits->total, $perPage, $page + 1, - $baseLink + buildLink($baseLink, $filters, null, null) ); foreach ($res->hits->hits as &$hit) { @@ -175,6 +183,7 @@ render( 'sort' => $sort, 'urlSorts' => $urlSorts, 'hitTemplate' => 'search/' . $GLOBALS['phinde']['hitTemplate'], + 'sidebarinclude' => $GLOBALS['phinde']['sidebarinclude'], ) ); ?>