diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/functions.inc.php | 6 | ||||
-rw-r--r-- | inc/html.inc.php | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/inc/functions.inc.php b/inc/functions.inc.php index 376b6e1..1c12c2f 100644 --- a/inc/functions.inc.php +++ b/inc/functions.inc.php | |||
@@ -1,8 +1,11 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | require_once 'conf/common.inc.php'; | ||
4 | |||
3 | # global functions | 5 | # global functions |
4 | 6 | ||
5 | function GET($index = NULL, $value = NULL) { | 7 | function GET($index = NULL, $value = NULL) { |
8 | global $CONFIG; | ||
6 | # parse all values from $_GET when no index is given | 9 | # parse all values from $_GET when no index is given |
7 | if ($index === NULL) { | 10 | if ($index === NULL) { |
8 | $arr = array(); | 11 | $arr = array(); |
@@ -40,6 +43,9 @@ function GET($index = NULL, $value = NULL) { | |||
40 | } | 43 | } |
41 | break; | 44 | break; |
42 | case 'p': # plugin | 45 | case 'p': # plugin |
46 | if ((!in_array($value, $CONFIG['allowed'])) && (!in_array($value, $CONFIG['overview']))) { | ||
47 | return NULL; | ||
48 | } | ||
43 | case 'c': # category | 49 | case 'c': # category |
44 | case 't': # type | 50 | case 't': # type |
45 | if (!preg_match('/^\w+$/u', $value)) { | 51 | if (!preg_match('/^\w+$/u', $value)) { |
diff --git a/inc/html.inc.php b/inc/html.inc.php index deebdc0..bc38b24 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php | |||
@@ -181,7 +181,7 @@ function plugins_list($host, $selected_plugins = array()) { | |||
181 | 181 | ||
182 | # other plugins | 182 | # other plugins |
183 | foreach($plugins as $plugin) { | 183 | foreach($plugins as $plugin) { |
184 | if (!in_array($plugin, $CONFIG['overview'])) { | 184 | if (in_array($plugin, $CONFIG['allowed'])) { |
185 | printf("<li><a %shref=\"%shost.php?h=%s&p=%s\">%s</a></li>\n", | 185 | printf("<li><a %shref=\"%shost.php?h=%s&p=%s\">%s</a></li>\n", |
186 | selected_plugin($plugin, $selected_plugins), | 186 | selected_plugin($plugin, $selected_plugins), |
187 | htmlentities($CONFIG['weburl']), | 187 | htmlentities($CONFIG['weburl']), |