Merged in paulis/processmaker/PM-VERACODE-3 (pull request #1660)

I solved all observation by Code Injection - Hight
This commit is contained in:
Julio Cesar Laura Avendaño
2015-03-12 16:31:55 -04:00
4 changed files with 25 additions and 8 deletions

View File

@@ -29,7 +29,10 @@ $pluginStatus = $_GET['status'];
$items = array ();
G::LoadClass( 'plugin' );
//here we are enabling or disabling the plugin and all related options registered.
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$path = PATH_PLUGINS . $pluginFile;
$path = $filter->validateInput($path, 'path');
$oPluginRegistry = & PMPluginRegistry::getSingleton();
@@ -69,7 +72,7 @@ if ($handle = opendir( PATH_PLUGINS )) {
}
/*----------------------------------********---------------------------------*/
//print "change to ENABLED";
require_once(PATH_PLUGINS . $pluginFile);
require_once($path);
$details = $oPluginRegistry->getPluginDetails($pluginFile);
$oPluginRegistry->enablePlugin($details->sNamespace);
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins