From 6b78f7d8b5be8488cd4c7caface2cdb9a449deee Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sun, 11 Oct 2026 15:12:35 +0200 Subject: [PATCH] Fix Filemin archive option handling Fixes a regression from [1e1f9982d](https://github.com/webmin/webmin/commit/1e1f9982d). That change put `--` in the wrong place for Zip, causing compression to fail. Tar could still treat filenames as command options. This puts `--` in the correct place for both. --- filemin/compress.cgi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/filemin/compress.cgi b/filemin/compress.cgi index 5d1ac931b..ceed6d4ff 100755 --- a/filemin/compress.cgi +++ b/filemin/compress.cgi @@ -17,32 +17,32 @@ if ($in{'method'} eq 'plain-tar') { $extension = ".tar"; $full = &validate_filename_path($in{'arch'}.$extension); $command = "tar cf ".quotemeta($full). - " -C ".quotemeta($cwd); + " -C ".quotemeta($cwd)." --"; } elsif ($in{'method'} eq 'xz-tar') { $extension = ".tar.xz"; $full = &validate_filename_path($in{'arch'}.$extension); $command = "tar cJf ".quotemeta($full). - " -C ".quotemeta($cwd); + " -C ".quotemeta($cwd)." --"; } elsif ($in{'method'} eq 'zstd-tar') { $extension = ".zst"; $full = &validate_filename_path($in{'arch'}.$extension); $command = "ZSTD_CLEVEL=19 tar --zstd -cf ". quotemeta($full). - " -C ".quotemeta($cwd); + " -C ".quotemeta($cwd)." --"; } elsif ($in{'method'} eq 'tar') { $extension = ".tar.gz"; $full = &validate_filename_path($in{'arch'}.$extension); $command = "tar czf ".quotemeta($full). - " -C ".quotemeta($cwd); + " -C ".quotemeta($cwd)." --"; } elsif ($in{'method'} eq 'zip') { $extension = ".zip"; $full = &validate_filename_path($in{'arch'}.$extension); $command = "cd ".quotemeta($cwd). - " && zip -r -- ".quotemeta($full); + " && zip -r ".quotemeta($full)." --"; } else { &error("Unknown method!");