summaryrefslogtreecommitdiff
path: root/inc/load.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2012-09-08 13:20:28 +0200
committerMichael Hamann <michael@content-space.de>2012-09-08 14:34:57 +0200
commitde50cad65ae679a602e71adddffdd74df7ea3fbb (patch)
tree94a390b91c61394363744b4b9494e71839c1db5d /inc/load.php
parentdd74fecfdfa05c8e95162678c00d3da3ba3dad6d (diff)
downloadrpg-de50cad65ae679a602e71adddffdd74df7ea3fbb.tar.gz
rpg-de50cad65ae679a602e71adddffdd74df7ea3fbb.tar.bz2
Check plugin naming conventions during load FS#2464
This checks if plugin names are valid and only loads valid plugin files, this could prevent some errors from wrong upgrades as described in FS#2464.
Diffstat (limited to 'inc/load.php')
-rw-r--r--inc/load.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/load.php b/inc/load.php
index b676518e7..57295bd8a 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -95,7 +95,7 @@ function load_autoload($name){
}
// Plugin loading
- if(preg_match('/^(helper|syntax|action|admin|renderer|remote)_plugin_([^_]+)(?:_([^_]+))?$/',
+ if(preg_match('/^(helper|syntax|action|admin|renderer|remote)_plugin_([a-z0-9]+)(?:_([^_]+))?$/',
$name, $m)) {
// try to load the wanted plugin file
$c = ((count($m) === 4) ? "/{$m[3]}" : '');