diff options
author | plegall <plg@piwigo.org> | 2015-02-12 14:35:42 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2015-02-12 14:35:42 +0000 |
commit | c0608565dabae6b25456ff6f665b0cd0f5afae4b (patch) | |
tree | d75fad6e38d5dff188a77229b3d4e1e93043d750 | |
parent | f07a61c105b62611dcb4d6b4dc51ac33c59500ca (diff) |
merge r30950 from trunk to branch 2.7
bug 3201 fixed: check plugin identifier
git-svn-id: http://piwigo.org/svn/branches/2.7@30951 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/plugin.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/admin/plugin.php b/admin/plugin.php index b636608ef..82939b35a 100644 --- a/admin/plugin.php +++ b/admin/plugin.php @@ -45,6 +45,12 @@ if (count($sections)<2) } $plugin_id = $sections[0]; + +if (!preg_match('/^\w+$/', $plugin_id)) +{ + die('Invalid plugin identifier'); +} + if ( !isset($pwg_loaded_plugins[$plugin_id]) ) { die('Invalid URL - plugin '.$plugin_id.' not active'); |