aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2015-07-04 12:45:29 +0200
committerPim van den Berg2015-07-04 12:45:29 +0200
commitcf12c8376411ed65c44fa873401c2f006b43f28f (patch)
tree50ad8aa59eae8fad3a07a6ca728d3b5a32fad0e0
parentfix PHP Notice about Undefined variable $aggr (diff)
downloadapt-panopticon_cgp-cf12c8376411ed65c44fa873401c2f006b43f28f.zip
apt-panopticon_cgp-cf12c8376411ed65c44fa873401c2f006b43f28f.tar.gz
apt-panopticon_cgp-cf12c8376411ed65c44fa873401c2f006b43f28f.tar.bz2
apt-panopticon_cgp-cf12c8376411ed65c44fa873401c2f006b43f28f.tar.xz
inc/functions: a host, pi and ti may contain colons (:) and spaces ( )
For example: "CPU Interface : 1" (snmp plugin + hp1810g switch)
-rw-r--r--inc/functions.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/functions.inc.php b/inc/functions.inc.php
index 9c36dce..55807d4 100644
--- a/inc/functions.inc.php
+++ b/inc/functions.inc.php
@@ -34,7 +34,7 @@ function GET($index = NULL, $value = NULL) {
34 case 'h': # host 34 case 'h': # host
35 case 'pi': # plugin instance 35 case 'pi': # plugin instance
36 case 'ti': # type instance 36 case 'ti': # type instance
37 if (!preg_match('/^[\w-.]+$/u', $value)) { 37 if (!preg_match('/^[\w-.: ]+$/u', $value)) {
38 error_log(sprintf('Invalid %s in $_GET["%s"]: "%s"', $desc[$index], $index, $value)); 38 error_log(sprintf('Invalid %s in $_GET["%s"]: "%s"', $desc[$index], $index, $value));
39 return NULL; 39 return NULL;
40 } 40 }