aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/graph.php
diff options
context:
space:
mode:
authorPim van den Berg2015-05-25 11:26:47 +0200
committerPim van den Berg2015-05-25 12:11:25 +0200
commit2a337e593359fb03472d1a6c4155971942b307be (patch)
tree2a2285fec7083ccfa87a9df6c5c325648ec85ebc /graph.php
parentinc/html: s/licence/license/ (diff)
downloadapt-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.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/graph.php b/graph.php
index 8eec2ec..b546d02 100644
--- a/graph.php
+++ b/graph.php
@@ -4,8 +4,8 @@ require_once 'conf/common.inc.php';
4require_once 'inc/functions.inc.php'; 4require_once 'inc/functions.inc.php';
5require_once 'inc/collectd.inc.php'; 5require_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
25if (validate_get(GET('h'), 'host') === NULL) { 25if (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
32if ($plugin == 'aggregation') { 32if ($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