* Re: [pbs-devel] [PATCH proxmox] fix #3302: allow more characters for email
@ 2021-04-08 8:07 Dietmar Maurer
0 siblings, 0 replies; 3+ messages in thread
From: Dietmar Maurer @ 2021-04-08 8:07 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Dominik Csapak
Please can we define a pub const regex, so that we can use it in the API?
> On 04/08/2021 8:01 AM Dominik Csapak <d.csapak@proxmox.com> wrote:
>
>
> any comment? we should really allow at least
> '_' and '+' in addition
>
> On 2/12/21 9:40 AM, Dominik Csapak wrote:
> > change to something similar as in pve-common
> > word characters, +, -, ~ and . for the local part
> >
> > Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> > ---
> > proxmox/src/tools/email.rs | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/proxmox/src/tools/email.rs b/proxmox/src/tools/email.rs
> > index b5d42c4..c6336f4 100644
> > --- a/proxmox/src/tools/email.rs
> > +++ b/proxmox/src/tools/email.rs
> > @@ -16,7 +16,7 @@ pub fn sendmail(
> > mailfrom: Option<&str>,
> > author: Option<&str>,
> > ) -> Result<(), Error> {
> > - let mail_regex = regex::Regex::new(r"^[a-zA-Z\.0-9-]+@[a-zA-Z\.0-9-]+$").unwrap();
> > + let mail_regex = regex::Regex::new(r"^[\w\+\-\~\.]+@[a-zA-Z\.0-9-]+$").unwrap();
> >
> > if mailto.is_empty() {
> > bail!("At least one recipient has to be specified!")
> >
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pbs-devel] [PATCH proxmox] fix #3302: allow more characters for email
2021-02-12 8:40 Dominik Csapak
@ 2021-04-08 6:01 ` Dominik Csapak
0 siblings, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-04-08 6:01 UTC (permalink / raw)
To: pbs-devel
any comment? we should really allow at least
'_' and '+' in addition
On 2/12/21 9:40 AM, Dominik Csapak wrote:
> change to something similar as in pve-common
> word characters, +, -, ~ and . for the local part
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> proxmox/src/tools/email.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/proxmox/src/tools/email.rs b/proxmox/src/tools/email.rs
> index b5d42c4..c6336f4 100644
> --- a/proxmox/src/tools/email.rs
> +++ b/proxmox/src/tools/email.rs
> @@ -16,7 +16,7 @@ pub fn sendmail(
> mailfrom: Option<&str>,
> author: Option<&str>,
> ) -> Result<(), Error> {
> - let mail_regex = regex::Regex::new(r"^[a-zA-Z\.0-9-]+@[a-zA-Z\.0-9-]+$").unwrap();
> + let mail_regex = regex::Regex::new(r"^[\w\+\-\~\.]+@[a-zA-Z\.0-9-]+$").unwrap();
>
> if mailto.is_empty() {
> bail!("At least one recipient has to be specified!")
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] [PATCH proxmox] fix #3302: allow more characters for email
@ 2021-02-12 8:40 Dominik Csapak
2021-04-08 6:01 ` Dominik Csapak
0 siblings, 1 reply; 3+ messages in thread
From: Dominik Csapak @ 2021-02-12 8:40 UTC (permalink / raw)
To: pbs-devel
change to something similar as in pve-common
word characters, +, -, ~ and . for the local part
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
proxmox/src/tools/email.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxmox/src/tools/email.rs b/proxmox/src/tools/email.rs
index b5d42c4..c6336f4 100644
--- a/proxmox/src/tools/email.rs
+++ b/proxmox/src/tools/email.rs
@@ -16,7 +16,7 @@ pub fn sendmail(
mailfrom: Option<&str>,
author: Option<&str>,
) -> Result<(), Error> {
- let mail_regex = regex::Regex::new(r"^[a-zA-Z\.0-9-]+@[a-zA-Z\.0-9-]+$").unwrap();
+ let mail_regex = regex::Regex::new(r"^[\w\+\-\~\.]+@[a-zA-Z\.0-9-]+$").unwrap();
if mailto.is_empty() {
bail!("At least one recipient has to be specified!")
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-08 8:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 8:07 [pbs-devel] [PATCH proxmox] fix #3302: allow more characters for email Dietmar Maurer
-- strict thread matches above, loose matches on Subject: below --
2021-02-12 8:40 Dominik Csapak
2021-04-08 6:01 ` Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox