From: <var...@us...> - 2010-05-12 09:44:31
|
Revision: 7398 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7398&view=rev Author: vargenau Date: 2010-05-12 09:44:25 +0000 (Wed, 12 May 2010) Log Message: ----------- Use global $AllAllowedPlugins Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2010-05-12 09:35:50 UTC (rev 7397) +++ trunk/lib/WikiPlugin.php 2010-05-12 09:44:25 UTC (rev 7398) @@ -487,7 +487,13 @@ function getPlugin($plugin_name, $pi=false) { global $ErrorManager; + global $AllAllowedPlugins; + if (in_array($plugin_name, $AllAllowedPlugins) === false) { + return $this->_error(sprintf(_("Plugin '%s' does not exist."), + $plugin_name)); + } + // Note that there seems to be no way to trap parse errors // from this include. (At least not via set_error_handler().) $plugin_source = "lib/plugin/$plugin_name.php"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |