ISSUE-116 Added functionality for plugins with symlink paths
This commit is contained in:
@@ -60,9 +60,9 @@ function handlePluginChange() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Secure path validation to prevent directory traversal attacks
|
// Secure path validation to prevent directory traversal attacks
|
||||||
$pluginFilePath = realpath(PATH_PLUGINS . $pluginFile);
|
$pluginFilePath = PATH_PLUGINS . $pluginFile;
|
||||||
$pluginDirPath = realpath(PATH_PLUGINS . $pluginName);
|
$pluginDirPath = PATH_PLUGINS . $pluginName;
|
||||||
$pluginsDir = realpath(PATH_PLUGINS);
|
$pluginsDir = PATH_PLUGINS;
|
||||||
|
|
||||||
// Ensure plugin file is within the allowed plugins directory
|
// Ensure plugin file is within the allowed plugins directory
|
||||||
if (!$pluginFilePath || strpos($pluginFilePath, $pluginsDir) !== 0) {
|
if (!$pluginFilePath || strpos($pluginFilePath, $pluginsDir) !== 0) {
|
||||||
|
|||||||
@@ -260,21 +260,18 @@ function activeDeactive(){
|
|||||||
success: function ( result, request ) {
|
success: function ( result, request ) {
|
||||||
var dataResponse = Ext.util.JSON.decode(result.responseText);
|
var dataResponse = Ext.util.JSON.decode(result.responseText);
|
||||||
|
|
||||||
if (dataResponse.status) {
|
if (typeof(dataResponse.success) != 'undefined' && dataResponse.success == true) {
|
||||||
if (dataResponse.status == "DISABLED-CODE") {
|
var site = '';
|
||||||
PMExt.notify(_("ID_PLUGINS"), dataResponse.message, "error", 5);
|
if (SYS_SKIN.substring(0,2) == 'ux') {
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var site = '';
|
|
||||||
if (SYS_SKIN.substring(0,2) == 'ux') {
|
|
||||||
site = PROCESSMAKER_URL + '/main?st=admin&s='+parent._NODE_SELECTED;
|
site = PROCESSMAKER_URL + '/main?st=admin&s='+parent._NODE_SELECTED;
|
||||||
} else {
|
} else {
|
||||||
site = PROCESSMAKER_URL + "/setup/main?s="+parent._NODE_SELECTED;
|
site = PROCESSMAKER_URL + "/setup/main?s="+parent._NODE_SELECTED;
|
||||||
|
}
|
||||||
|
parent.parent.location.href = site;
|
||||||
|
} else {
|
||||||
|
let errorMsg = dataResponse.error || _('ID_UNEXPECTED_ERROR_OCCURRED_PLEASE');
|
||||||
|
PMExt.notify(_("ID_PLUGINS"), errorMsg, "error", 5);
|
||||||
}
|
}
|
||||||
parent.parent.location.href = site
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
store.reload();
|
store.reload();
|
||||||
|
|||||||
Reference in New Issue
Block a user