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 /inc/functions.inc.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-- | inc/functions.inc.php | 12 |
1 files changed, 6 insertions, 6 deletions
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) { | |||
10 | 10 | ||
11 | function validate_get($value, $type) { | 11 | function validate_get($value, $type) { |
12 | switch($type) { | 12 | switch($type) { |
13 | case 'host': | 13 | case 'h': # host |
14 | if (!preg_match('/^[\w-.]+$/u', $value)) | 14 | if (!preg_match('/^[\w-.]+$/u', $value)) |
15 | return NULL; | 15 | return NULL; |
16 | break; | 16 | break; |
17 | case 'plugin': | 17 | case 'p': # plugin |
18 | case 'category': | 18 | case 'c': # category |
19 | case 'type': | 19 | case 't': # type |
20 | if (!preg_match('/^\w+$/u', $value)) | 20 | if (!preg_match('/^\w+$/u', $value)) |
21 | return NULL; | 21 | return NULL; |
22 | break; | 22 | break; |
23 | case 'pinstance': | 23 | case 'pi': # plugin instance |
24 | case 'tinstance': | 24 | case 'ti': # type instance |
25 | if (!preg_match('/^[\w-]+$/u', $value)) | 25 | if (!preg_match('/^[\w-]+$/u', $value)) |
26 | return NULL; | 26 | return NULL; |
27 | break; | 27 | break; |