Skip to content

Commit

Permalink
inc/functions: a host, pi and ti may contain colons (:) and spaces ( )
Browse files Browse the repository at this point in the history
For example: "CPU Interface : 1" (snmp plugin + hp1810g switch)
  • Loading branch information
pommi committed Jul 4, 2015
1 parent f8b5ddb commit cf12c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function GET($index = NULL, $value = NULL) {
case 'h': # host
case 'pi': # plugin instance
case 'ti': # type instance
if (!preg_match('/^[\w-.]+$/u', $value)) {
if (!preg_match('/^[\w-.: ]+$/u', $value)) {
error_log(sprintf('Invalid %s in $_GET["%s"]: "%s"', $desc[$index], $index, $value));
return NULL;
}
Expand Down

0 comments on commit cf12c83

Please sign in to comment.