Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
OS Injection issue with plugins
  • Loading branch information
ghormann committed Jun 26, 2021
1 parent 3cb9c99 commit 8bfba3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions scripts/install_plugin
Expand Up @@ -15,6 +15,12 @@ teeOutput

echo "Installing plugin $1"
cd ${PLUGINDIR} && $SUDO git clone --single-branch --branch $3 $2 $1
rc=$?
if [ $rc -ne 0 ]; then
echo "Failed to fetch $1 using $2 -- aborting"
exit 1
fi

if [ "x$4" != "x" ]
then
(cd $1 && $SUDO git reset --hard $4)
Expand Down
4 changes: 2 additions & 2 deletions www/api/controllers/plugin.php
Expand Up @@ -41,9 +41,9 @@ function InstallPlugin()

$pluginInfo = json_decode($pluginInfoJSON, true);

$plugin = $pluginInfo['repoName'];
$plugin = escapeshellcmd($pluginInfo['repoName']);
$srcURL = $pluginInfo['srcURL'];
$branch = $pluginInfo['branch'];
$branch = escapeshellcmd($pluginInfo['branch']);
$sha = $pluginInfo['sha'];
$infoURL = $pluginInfo['infoURL'];

Expand Down

0 comments on commit 8bfba3c

Please sign in to comment.