From aa7bebe6521febb1d828d9217489af604c711271 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 30 Oct 2024 22:35:56 +0100 Subject: [PATCH] [HttpClient] Fix Process-based escaping in HttpClientDataCollector --- DataCollector/HttpClientDataCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataCollector/HttpClientDataCollector.php b/DataCollector/HttpClientDataCollector.php index 8afddcb..a749aa6 100644 --- a/DataCollector/HttpClientDataCollector.php +++ b/DataCollector/HttpClientDataCollector.php @@ -253,7 +253,7 @@ private function escapePayload(string $payload): string static $useProcess; if ($useProcess ??= function_exists('proc_open') && class_exists(Process::class)) { - return (new Process([$payload]))->getCommandLine(); + return substr((new Process(['', $payload]))->getCommandLine(), 3); } if ('\\' === \DIRECTORY_SEPARATOR) {