Skip to content

Commit

Permalink
Escape the notify-send path when getting the version number
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Feb 27, 2017
1 parent 029305e commit 254ced6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CodeSniffer/Reports/Notifysend.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function __construct()
{
$path = PHP_CodeSniffer::getConfigData('notifysend_path');
if ($path !== null) {
$this->path = $path;
$this->path = escapeshellcmd($path);
}

$timeout = PHP_CodeSniffer::getConfigData('notifysend_timeout');
Expand Down Expand Up @@ -246,7 +246,7 @@ protected function notifyErrors($msg)
*/
protected function getBasicCommand()
{
$cmd = escapeshellcmd($this->path);
$cmd = $this->path;
$cmd .= ' --category dev.validate';
$cmd .= ' -h int:transient:1';
$cmd .= ' -t '.(int) $this->timeout;
Expand Down

0 comments on commit 254ced6

Please sign in to comment.