From 254ced69163e2a992ad35a376b8e00a59ee0cc5d Mon Sep 17 00:00:00 2001 From: Greg Sherwood Date: Tue, 28 Feb 2017 08:47:39 +1100 Subject: [PATCH] Escape the notify-send path when getting the version number --- CodeSniffer/Reports/Notifysend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodeSniffer/Reports/Notifysend.php b/CodeSniffer/Reports/Notifysend.php index 48a80593f4..fc3fccecc3 100644 --- a/CodeSniffer/Reports/Notifysend.php +++ b/CodeSniffer/Reports/Notifysend.php @@ -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'); @@ -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;