aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.inc.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/functions.inc.php b/inc/functions.inc.php
index 2906530..b0706d5 100644
--- a/inc/functions.inc.php
+++ b/inc/functions.inc.php
@@ -5,17 +5,17 @@
5function validate_get($value, $type) { 5function validate_get($value, $type) {
6 switch($type) { 6 switch($type) {
7 case 'host': 7 case 'host':
8 if (!preg_match('/^[\d\w\W]+$/', $value)) 8 if (!preg_match('/^[\d\w\W]+$/u', $value))
9 return NULL; 9 return NULL;
10 break; 10 break;
11 case 'plugin': 11 case 'plugin':
12 case 'type': 12 case 'type':
13 if (!preg_match('/^\w+$/', $value)) 13 if (!preg_match('/^\w+$/u', $value))
14 return NULL; 14 return NULL;
15 break; 15 break;
16 case 'pinstance': 16 case 'pinstance':
17 case 'tinstance': 17 case 'tinstance':
18 if (!preg_match('/^[\d\w-]+$/', $value)) 18 if (!preg_match('/^[\d\w-]+$/u', $value))
19 return NULL; 19 return NULL;
20 break; 20 break;
21 } 21 }
@@ -23,5 +23,8 @@ function validate_get($value, $type) {
23 return $value; 23 return $value;
24} 24}
25 25
26function crc32hex($str) {
27 return sprintf("%x",crc32($str));
28}
26 29
27?> 30?>