diff options
author | Pim van den Berg | 2015-05-25 11:26:47 +0200 |
---|---|---|
committer | Pim van den Berg | 2015-05-25 12:11:25 +0200 |
commit | 2a337e593359fb03472d1a6c4155971942b307be (patch) | |
tree | 2a2285fec7083ccfa87a9df6c5c325648ec85ebc /graph.php | |
parent | inc/html: s/licence/license/ (diff) | |
download | apt-panopticon_cgp-2a337e593359fb03472d1a6c4155971942b307be.zip apt-panopticon_cgp-2a337e593359fb03472d1a6c4155971942b307be.tar.gz apt-panopticon_cgp-2a337e593359fb03472d1a6c4155971942b307be.tar.bz2 apt-panopticon_cgp-2a337e593359fb03472d1a6c4155971942b307be.tar.xz |
inc/functions: make type argument of validate_get function exactly the same as $_GET value
Diffstat (limited to '')
-rw-r--r-- | graph.php | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,8 +4,8 @@ require_once 'conf/common.inc.php'; | |||
4 | require_once 'inc/functions.inc.php'; | 4 | require_once 'inc/functions.inc.php'; |
5 | require_once 'inc/collectd.inc.php'; | 5 | require_once 'inc/collectd.inc.php'; |
6 | 6 | ||
7 | $plugin = validate_get(GET('p'), 'plugin'); | 7 | $plugin = validate_get(GET('p'), 'p'); |
8 | $type = validate_get(GET('t'), 'type'); | 8 | $type = validate_get(GET('t'), 't'); |
9 | $width = GET('x') ? filter_var(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'] |
@@ -22,7 +22,7 @@ if ($width === NULL || $height === NULL) { | |||
22 | error_image(); | 22 | error_image(); |
23 | } | 23 | } |
24 | 24 | ||
25 | if (validate_get(GET('h'), 'host') === NULL) { | 25 | if (validate_get(GET('h'), 'h') === NULL) { |
26 | error_log('Invalid host: "' . urlencode(GET('h')) . '"'); | 26 | error_log('Invalid host: "' . urlencode(GET('h')) . '"'); |
27 | error_image(); | 27 | error_image(); |
28 | } | 28 | } |
@@ -31,7 +31,7 @@ $typesdb = parse_typesdb_file($CONFIG['typesdb']); | |||
31 | 31 | ||
32 | if ($plugin == 'aggregation') { | 32 | if ($plugin == 'aggregation') { |
33 | $pi = explode("-", GET('pi')); | 33 | $pi = explode("-", GET('pi')); |
34 | $plugin = $_GET['p'] = validate_get($pi[0], 'plugin'); | 34 | $plugin = $_GET['p'] = validate_get($pi[0], 'p'); |
35 | } | 35 | } |
36 | 36 | ||
37 | # plugin json | 37 | # plugin json |