ISSUE-116 Added functionality for plugins with symlink paths

This commit is contained in:
Brayan Pereyra
2025-09-10 15:46:57 +00:00
parent 6e7b1bc7ff
commit 4949243dd8
2 changed files with 12 additions and 15 deletions

View File

@@ -60,9 +60,9 @@ function handlePluginChange() {
}
// Secure path validation to prevent directory traversal attacks
$pluginFilePath = realpath(PATH_PLUGINS . $pluginFile);
$pluginDirPath = realpath(PATH_PLUGINS . $pluginName);
$pluginsDir = realpath(PATH_PLUGINS);
$pluginFilePath = PATH_PLUGINS . $pluginFile;
$pluginDirPath = PATH_PLUGINS . $pluginName;
$pluginsDir = PATH_PLUGINS;
// Ensure plugin file is within the allowed plugins directory
if (!$pluginFilePath || strpos($pluginFilePath, $pluginsDir) !== 0) {

View File

@@ -260,21 +260,18 @@ function activeDeactive(){
success: function ( result, request ) {
var dataResponse = Ext.util.JSON.decode(result.responseText);
if (dataResponse.status) {
if (dataResponse.status == "DISABLED-CODE") {
PMExt.notify(_("ID_PLUGINS"), dataResponse.message, "error", 5);
return;
}
}
var site = '';
if (SYS_SKIN.substring(0,2) == 'ux') {
if (typeof(dataResponse.success) != 'undefined' && dataResponse.success == true) {
var site = '';
if (SYS_SKIN.substring(0,2) == 'ux') {
site = PROCESSMAKER_URL + '/main?st=admin&s='+parent._NODE_SELECTED;
} else {
} else {
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;
store.reload();