Skip to content

Commit

Permalink
Merge pull request #165 from julianbrost/php7.3-host-regex
Browse files Browse the repository at this point in the history
functions.inc.php: escape minus in regex
  • Loading branch information
pommi authored Dec 9, 2018
2 parents 1920ca2 + 16e710f commit 72acfcb
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 72acfcb

Please sign in to comment.