From 2a337e593359fb03472d1a6c4155971942b307be Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 25 May 2015 11:26:47 +0200 Subject: inc/functions: make type argument of validate_get function exactly the same as $_GET value --- inc/functions.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc/functions.inc.php') diff --git a/inc/functions.inc.php b/inc/functions.inc.php index abe0763..f667772 100644 --- a/inc/functions.inc.php +++ b/inc/functions.inc.php @@ -10,18 +10,18 @@ function GET($index) { function validate_get($value, $type) { switch($type) { - case 'host': + case 'h': # host if (!preg_match('/^[\w-.]+$/u', $value)) return NULL; break; - case 'plugin': - case 'category': - case 'type': + case 'p': # plugin + case 'c': # category + case 't': # type if (!preg_match('/^\w+$/u', $value)) return NULL; break; - case 'pinstance': - case 'tinstance': + case 'pi': # plugin instance + case 'ti': # type instance if (!preg_match('/^[\w-]+$/u', $value)) return NULL; break; -- cgit v1.1