From baf1d9a01127509f8f14cf4b6754a9eea0f1277a Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 9 Sep 2012 13:01:11 +0200 Subject: Less restrictive plugin name checking This partially reverts de50cad65ae679a602e71adddffdd74df7ea3fbb as the strict check breaks existing plugins and this shouldn't be changed without prior discussion and a warning for plugin authors with some time to adjust their plugins. Now all characters that are valid in PHP class names except "_" are allowed. --- inc/plugincontroller.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'inc/plugincontroller.class.php') diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index 0d3080250..9d7b51e14 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -156,8 +156,9 @@ class Doku_Plugin_Controller { } else { $all_plugins[$plugin] = 1; } - if ($all_plugins[$plugin] == 1 && preg_match('/^[a-z0-9]+$/', $plugin) !== 1) { - msg(sprintf("Plugin name '%s' is not a valid plugin name, only the characters a-z and 0-9 are allowed.", hsc($plugin)), -1); + if ($all_plugins[$plugin] == 1 && preg_match('/^[a-zA-Z0-9\x7f-\xff]+$/', $plugin) !== 1) { + msg(sprintf("Plugin name '%s' is not a valid plugin name, only the characters a-z and 0-9 are allowed. ". + 'Maybe the plugin has been installed in the wrong directory?', hsc($plugin)), -1); } } $this->tmp_plugins = $all_plugins; -- cgit v1.2.3