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
|
||||
$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) {
|
||||
|
||||
Reference in New Issue
Block a user