From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id BA893627FA for ; Tue, 22 Feb 2022 10:13:04 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A85CC2243E for ; Tue, 22 Feb 2022 10:12:34 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id EB98522434 for ; Tue, 22 Feb 2022 10:12:33 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id B46D24618C for ; Tue, 22 Feb 2022 10:12:33 +0100 (CET) From: Fabian Ebner To: pve-devel@lists.proxmox.com Date: Tue, 22 Feb 2022 10:12:29 +0100 Message-Id: <20220222091229.16104-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.131 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: [pve-devel] [PATCH v2 pve-zsync] parse cron: properly split commandline X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2022 09:13:04 -0000 Reported in the community forum: https://forum.proxmox.com/threads/105254/ Signed-off-by: Fabian Ebner --- Changes from v1: * Use shellwords(). pve-zsync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pve-zsync b/pve-zsync index 7246336..46b0ba7 100755 --- a/pve-zsync +++ b/pve-zsync @@ -9,6 +9,7 @@ use File::Path qw(make_path); use JSON; use IO::File; use String::ShellQuote 'shell_quote'; +use Text::ParseWords; my $PROGNAME = "pve-zsync"; my $CONFIG_PATH = "/var/lib/${PROGNAME}"; @@ -308,8 +309,7 @@ sub parse_cron { my $cfg = {}; while (my $line = shift(@text)) { - - my @arg = split('\s', $line); + my @arg = Text::ParseWords::shellwords($line); my $param = parse_argv(@arg); if ($param->{source} && $param->{dest}) { -- 2.30.2