diff options
author | Pim van den Berg | 2013-12-29 16:44:38 +0100 |
---|---|---|
committer | Pim van den Berg | 2013-12-29 16:53:46 +0100 |
commit | c932f370da4e7876a615e4cd8b23a281ac360c3a (patch) | |
tree | d4ee2d94c5843b025a36e70fab6ec1e09ebd6ae0 /graph.php | |
parent | fix heigth -> height typo (diff) | |
download | apt-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.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -17,6 +17,11 @@ if (!file_exists($CONFIG['webdir'].'/plugin/'.$plugin.'.php')) { | |||
17 | error_image(); | 17 | error_image(); |
18 | } | 18 | } |
19 | 19 | ||
20 | if ($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 |
21 | include $CONFIG['webdir'].'/plugin/'.$plugin.'.php'; | 26 | include $CONFIG['webdir'].'/plugin/'.$plugin.'.php'; |
22 | 27 | ||