From 6a3dfaaa32e22b4b5859ebc9aa645edcd6e4ac7d Mon Sep 17 00:00:00 2001 From: fvquicke Date: Thu, 18 Sep 2025 06:50:32 +0000 Subject: [PATCH] use escapeshellcmd to escape command (#156) --- Command/CronRunCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Command/CronRunCommand.php b/Command/CronRunCommand.php index 78b66f9..0dfffc6 100644 --- a/Command/CronRunCommand.php +++ b/Command/CronRunCommand.php @@ -93,7 +93,7 @@ protected function getJobResolver(string $jobName, bool $force = false, bool $sc $resolver = new ArrayResolver(); $job = new ShellJobWrapper(); - $job->setCommand(escapeshellarg($phpExecutable) . ' --define max_execution_time='.ini_get('max_execution_time').' --define memory_limit='.ini_get('memory_limit').' ' . $rootDir . '/bin/console ' . $dbJob->getCommand()); + $job->setCommand(escapeshellcmd($phpExecutable) . ' --define max_execution_time='.ini_get('max_execution_time').' --define memory_limit='.ini_get('memory_limit').' ' . $rootDir . '/bin/console ' . $dbJob->getCommand()); $job->setSchedule(new CrontabSchedule($pattern)); $job->raw = $dbJob;