Add required php extensions to composer.json
[phinde.git] / www / index.php
index da7b27cacfe5e8facc643409c3e60f194fce4ab1..c1acfdf301c99cadbf5ef491e2404f3ec656e8fa 100644 (file)
@@ -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'];