From 181d92acaa8b831faa860b251281a1b99410ffc7 Mon Sep 17 00:00:00 2001 From: Christian Keuerleber Date: Wed, 9 Dec 2020 16:31:06 +0100 Subject: [PATCH] TASK: escape shell args in wget --- Classes/Utility/Wget/WgetCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/Utility/Wget/WgetCommand.php b/Classes/Utility/Wget/WgetCommand.php index 89eb920f..1a8a1e06 100644 --- a/Classes/Utility/Wget/WgetCommand.php +++ b/Classes/Utility/Wget/WgetCommand.php @@ -594,7 +594,8 @@ protected function buildCommand() } } - return sprintf('%s %s "%s"', $this->wgetBinaryPath, implode(' ', $arguments), $this->url); + return sprintf('%s %s "%s"', $this->wgetBinaryPath, implode(' ', array_map('escapeshellarg', $arguments)), escapeshellarg($this->url)); + }