aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/graph.php
diff options
context:
space:
mode:
authorPim van den Berg2014-07-21 21:47:42 +0200
committerPim van den Berg2014-07-21 21:57:15 +0200
commitb6ff5ed9f5c8ee1d010ab9567ea890da7aad0d46 (patch)
tree53087588b258ac8d6efcbb2c356eacf43fea4f10 /graph.php
parenttype/base: print shellcmd when rrd_graph('debug') is called (diff)
downloadapt-panopticon_cgp-b6ff5ed9f5c8ee1d010ab9567ea890da7aad0d46.zip
apt-panopticon_cgp-b6ff5ed9f5c8ee1d010ab9567ea890da7aad0d46.tar.gz
apt-panopticon_cgp-b6ff5ed9f5c8ee1d010ab9567ea890da7aad0d46.tar.bz2
apt-panopticon_cgp-b6ff5ed9f5c8ee1d010ab9567ea890da7aad0d46.tar.xz
graph: use filter_var instead of filter_input to allow overriding GET from detail.php
In detail.php $_GET['x'] and $_GET['y'] are overridden. filter_input takes the original values. This results in NULL values.
Diffstat (limited to 'graph.php')
-rw-r--r--graph.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/graph.php b/graph.php
index 2d62d92..2c3f6e6 100644
--- a/graph.php
+++ b/graph.php
@@ -6,11 +6,11 @@ require_once 'inc/collectd.inc.php';
6 6
7$plugin = validate_get(GET('p'), 'plugin'); 7$plugin = validate_get(GET('p'), 'plugin');
8$type = validate_get(GET('t'), 'type'); 8$type = validate_get(GET('t'), 'type');
9$width = GET('x') ? filter_input(INPUT_GET, 'x', FILTER_VALIDATE_INT, array( 9$width = GET('x') ? filter_var(GET('x'), FILTER_VALIDATE_INT, array(
10 'min_range' => 10, 10 'min_range' => 10,
11 'max_range' => $CONFIG['max-width'] 11 'max_range' => $CONFIG['max-width']
12)) : $CONFIG['width']; 12)) : $CONFIG['width'];
13$height = GET('y') ? filter_input(INPUT_GET, 'y', FILTER_VALIDATE_INT, array( 13$height = GET('y') ? filter_var(GET('y'), FILTER_VALIDATE_INT, array(
14 'min_range' => 10, 14 'min_range' => 10,
15 'max_range' => $CONFIG['max-height'] 15 'max_range' => $CONFIG['max-height']
16)) : $CONFIG['height']; 16)) : $CONFIG['height'];