diff options
author | Pim van den Berg | 2015-06-22 10:30:54 +0200 |
---|---|---|
committer | Pim van den Berg | 2015-06-22 10:30:54 +0200 |
commit | 4dd3181b3d8d2ceb58c2fb844d276f9008455e90 (patch) | |
tree | 386855367c66ee5e9bf2fc37db1c9749ace04831 /inc | |
parent | plugin: move local plugins from conf/plugin to plugin/local (diff) | |
download | apt-panopticon_cgp-4dd3181b3d8d2ceb58c2fb844d276f9008455e90.zip apt-panopticon_cgp-4dd3181b3d8d2ceb58c2fb844d276f9008455e90.tar.gz apt-panopticon_cgp-4dd3181b3d8d2ceb58c2fb844d276f9008455e90.tar.bz2 apt-panopticon_cgp-4dd3181b3d8d2ceb58c2fb844d276f9008455e90.tar.xz |
inc/functions: a plugin/type instance may contain a dot
Closes #123
Diffstat (limited to 'inc')
-rw-r--r-- | inc/functions.inc.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/inc/functions.inc.php b/inc/functions.inc.php index 9e56868..9c36dce 100644 --- a/inc/functions.inc.php +++ b/inc/functions.inc.php | |||
@@ -32,6 +32,8 @@ function GET($index = NULL, $value = NULL) { | |||
32 | 32 | ||
33 | switch($index) { | 33 | switch($index) { |
34 | case 'h': # host | 34 | case 'h': # host |
35 | case 'pi': # plugin instance | ||
36 | case 'ti': # type instance | ||
35 | if (!preg_match('/^[\w-.]+$/u', $value)) { | 37 | if (!preg_match('/^[\w-.]+$/u', $value)) { |
36 | 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)); |
37 | return NULL; | 39 | return NULL; |
@@ -45,13 +47,6 @@ function GET($index = NULL, $value = NULL) { | |||
45 | return NULL; | 47 | return NULL; |
46 | } | 48 | } |
47 | break; | 49 | break; |
48 | case 'pi': # plugin instance | ||
49 | case 'ti': # type instance | ||
50 | if (!preg_match('/^[\w-]+$/u', $value)) { | ||
51 | error_log(sprintf('Invalid %s in $_GET["%s"]: "%s"', $desc[$index], $index, $value)); | ||
52 | return NULL; | ||
53 | } | ||
54 | break; | ||
55 | case 's': # seconds | 50 | case 's': # seconds |
56 | case 'x': # x-axis | 51 | case 'x': # x-axis |
57 | case 'y': # y-axis | 52 | case 'y': # y-axis |