From b5605e01c14354fc8e2dcae8cefd90c3674880d9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:55:56 +0000 Subject: [PATCH] fix: add -- end-of-options marker before filename operands in tar/zip/gzip commands Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com> --- web/includes/download_functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/includes/download_functions.php b/web/includes/download_functions.php index 3500fe095..d369a92a3 100644 --- a/web/includes/download_functions.php +++ b/web/includes/download_functions.php @@ -147,7 +147,7 @@ function downloadEvents( } if ($command) { - $command .= ' '.escapeshellarg($mergedFileName); # Name of the file to be added + $command .= ' -- '.escapeshellarg($mergedFileName); # Name of the file to be added if (executeShelCommand($command, $deleteFile = $mergedFileName) === false) return false; } } # end foreach monitor @@ -160,7 +160,7 @@ function downloadEvents( # Create an archive if necessary //$exportCompressed = true; // For debugging if ($exportCompressed) { - $command = 'gzip '.escapeshellarg($archive_path); # Name of the file to be archived + $command = 'gzip -- '.escapeshellarg($archive_path); # Name of the file to be archived if (executeShelCommand($command) === false) return false; $archiveFileName .= '.gz'; }