aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/graph.php
diff options
context:
space:
mode:
authorPim van den Berg2013-12-29 16:44:38 +0100
committerPim van den Berg2013-12-29 16:53:46 +0100
commitc932f370da4e7876a615e4cd8b23a281ac360c3a (patch)
treed4ee2d94c5843b025a36e70fab6ec1e09ebd6ae0 /graph.php
parentfix heigth -> height typo (diff)
downloadapt-panopticon_cgp-c932f370da4e7876a615e4cd8b23a281ac360c3a.zip
apt-panopticon_cgp-c932f370da4e7876a615e4cd8b23a281ac360c3a.tar.gz
apt-panopticon_cgp-c932f370da4e7876a615e4cd8b23a281ac360c3a.tar.bz2
apt-panopticon_cgp-c932f370da4e7876a615e4cd8b23a281ac360c3a.tar.xz
graph: add configurable limit to graph width/height
Closes: https://github.com/pommi/CGP/pull/34
Diffstat (limited to 'graph.php')
-rw-r--r--graph.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/graph.php b/graph.php
index 37e442a..d170a6c 100644
--- a/graph.php
+++ b/graph.php
@@ -17,6 +17,11 @@ if (!file_exists($CONFIG['webdir'].'/plugin/'.$plugin.'.php')) {
17 error_image(); 17 error_image();
18} 18}
19 19
20if ($width > $CONFIG['max-width'] || $height > $CONFIG['max-height']) {
21 error_log('Resquested image is too large. Please configure max-width and max-height.');
22 error_image();
23}
24
20# load plugin 25# load plugin
21include $CONFIG['webdir'].'/plugin/'.$plugin.'.php'; 26include $CONFIG['webdir'].'/plugin/'.$plugin.'.php';
22 27