git.cweiske.de
/
phinde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1979dce
)
Do not allow pages > 100
author
Christian Weiske
<
[email protected]
>
Tue, 8 Jan 2019 19:35:34 +0000
(20:35 +0100)
committer
Christian Weiske
<
[email protected]
>
Tue, 8 Jan 2019 19:35:51 +0000
(20:35 +0100)
www/index.php
patch
|
blob
|
history
diff --git
a/www/index.php
b/www/index.php
index da7b27cacfe5e8facc643409c3e60f194fce4ab1..7c4904b4d45a6cac241fd0564d5535df8c213a85 100644
(file)
--- 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'];