--- a/include/git/GitExe.class.php +++ b/include/git/GitExe.class.php @@ -192,7 +192,7 @@ { $gitDir = ''; if (!empty($projectPath)) { - $gitDir = '--git-dir=' . $projectPath; + $gitDir = '--git-dir=' . escapeshellarg($projectPath); } return $this->binary . ' ' . $gitDir . ' ' . $command . ' ' . implode(' ', $args);