diff --git a/lib/Consumer/ForkCurl.php b/lib/Consumer/ForkCurl.php index 91b06ef..b38528c 100644 --- a/lib/Consumer/ForkCurl.php +++ b/lib/Consumer/ForkCurl.php @@ -53,7 +53,7 @@ public function flushBatch(array $messages): bool $cmd .= ' -d ' . $payload; } - $cmd .= " '" . $url . "'"; + $cmd .= ' ' . escapeshellarg($url); // Verify payload size is below 512KB if (strlen($payload) >= 500 * 1024) { @@ -67,7 +67,7 @@ public function flushBatch(array $messages): bool $library = $messages[0]['context']['library']; $libName = $library['name']; $libVersion = $library['version']; - $cmd .= " -H 'User-Agent: $libName/$libVersion'"; + $cmd .= ' -H ' . escapeshellarg("User-Agent: $libName/$libVersion"); if (!$this->debug()) { $cmd .= ' > /dev/null 2>&1 &';