From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH guest-common 1/4] vzdump: loosen mailto pattern to allow whitespaces
Date: Fri, 12 Feb 2021 13:23:20 +0100 [thread overview]
Message-ID: <20210212122323.15461-1-f.ebner@proxmox.com> (raw)
to make it more compatible to what we had previously. In pve-manger,
split_list() is called on the parameter, so any whitespaces and even stand-alone
',' and ';' are taken care of, leaving only the real addresses. This also fixes
creating a backup job with empty mailto in the UI.
For example,
> vzdump 153 --mailto " ,,,developer@proxmox.com; admin@proxmox.com ; "
was valid and worked in PVE 6.2.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
PVE/VZDump/Common.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/VZDump/Common.pm b/PVE/VZDump/Common.pm
index af141de..fb11b3d 100644
--- a/PVE/VZDump/Common.pm
+++ b/PVE/VZDump/Common.pm
@@ -72,7 +72,7 @@ sub parse_dow {
};
my $mailto_pattern = '[a-zA-Z0-9+._@][-a-zA-Z0-9+._@]*';
-my $mailto_list_pattern = "($mailto_pattern)([;,]$mailto_pattern)*";
+my $mailto_list_pattern = qr/([;,]?(?:$mailto_pattern|\s*))*/;
my $confdesc = {
vmid => {
--
2.20.1
next reply other threads:[~2021-02-12 12:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 12:23 Fabian Ebner [this message]
2021-02-12 12:23 ` [pve-devel] [PATCH manager 2/4] vzdump: refactor parsing mailto and exclude-path Fabian Ebner
2021-02-12 12:23 ` [pve-devel] [PATCH manager 3/4] test: vzdump: add tests for mailto Fabian Ebner
2021-02-12 12:23 ` [pve-devel] [PATCH manager 4/4] test: vzdump: rename vzdump_new_retention_test.pl to vzdump_new_test.pl Fabian Ebner
2021-02-15 8:47 ` [pve-devel] [PATCH guest-common 1/4] vzdump: loosen mailto pattern to allow whitespaces Fabian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210212122323.15461-1-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox