Skip to content

Commit 254ced6

Browse files
committed
Escape the notify-send path when getting the version number
1 parent 029305e commit 254ced6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CodeSniffer/Reports/Notifysend.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __construct()
8282
{
8383
$path = PHP_CodeSniffer::getConfigData('notifysend_path');
8484
if ($path !== null) {
85-
$this->path = $path;
85+
$this->path = escapeshellcmd($path);
8686
}
8787

8888
$timeout = PHP_CodeSniffer::getConfigData('notifysend_timeout');
@@ -246,7 +246,7 @@ protected function notifyErrors($msg)
246246
*/
247247
protected function getBasicCommand()
248248
{
249-
$cmd = escapeshellcmd($this->path);
249+
$cmd = $this->path;
250250
$cmd .= ' --category dev.validate';
251251
$cmd .= ' -h int:transient:1';
252252
$cmd .= ' -t '.(int) $this->timeout;

0 commit comments

Comments
 (0)