From b6ff5ed9f5c8ee1d010ab9567ea890da7aad0d46 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 21 Jul 2014 21:47:42 +0200 Subject: 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. --- graph.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graph.php') 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'; $plugin = validate_get(GET('p'), 'plugin'); $type = validate_get(GET('t'), 'type'); -$width = GET('x') ? filter_input(INPUT_GET, 'x', FILTER_VALIDATE_INT, array( +$width = GET('x') ? filter_var(GET('x'), FILTER_VALIDATE_INT, array( 'min_range' => 10, 'max_range' => $CONFIG['max-width'] )) : $CONFIG['width']; -$height = GET('y') ? filter_input(INPUT_GET, 'y', FILTER_VALIDATE_INT, array( +$height = GET('y') ? filter_var(GET('y'), FILTER_VALIDATE_INT, array( 'min_range' => 10, 'max_range' => $CONFIG['max-height'] )) : $CONFIG['height']; -- cgit v1.1