mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-07-31 22:29:26 +02:00
Prepend this->rootPath if not absolute path
This commit is contained in:
parent
69510a4e92
commit
b3fe781c19
@ -300,7 +300,12 @@ class PluginInstaller
|
||||
{
|
||||
foreach ($configurations as $config) {
|
||||
$source = escapeshellarg($pluginDir . DIRECTORY_SEPARATOR . $config['source']);
|
||||
$destination = escapeshellarg($config['destination']);
|
||||
$destination = $config['destination'];
|
||||
|
||||
if (!str_starts_with($destination, '/')) {
|
||||
$destination = $this->rootPath . '/' . ltrim($destination, '/');
|
||||
}
|
||||
$destination = escapeshellarg($destination);
|
||||
$cmd = sprintf('sudo /etc/raspap/plugins/plugin_helper.sh config %s %s', $source, $destination);
|
||||
$return = shell_exec($cmd);
|
||||
if (strpos(strtolower($return), 'ok') === false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user