all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Lorenz Stechauner <l.stechauner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 widget-toolkit] toolkit: update email regex for acme account
Date: Fri, 23 Apr 2021 10:15:13 +0200	[thread overview]
Message-ID: <20210423081513.34071-1-l.stechauner@proxmox.com> (raw)

Email regex only allowed two domain parts.
(probably copy/paste error from PVE::Tools)
Now allowing multiple domain parts.

Reported in our community forum:
https://forum.proxmox.com/threads/wrong-email-validation-when-adding-acme-account.88074/

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
---
In regex the _ character is already included in \w, therefore removing it
 src/Toolkit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Toolkit.js b/src/Toolkit.js
index 6ae31ed..ffbd47a 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -184,7 +184,7 @@ Ext.apply(Ext.form.field.VTypes, {
     passwordText: gettext('Passwords do not match'),
 
     email: function(value) {
-	let emailre = /^[\w+~-]+(\.[\w+~-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)$/;
+	let emailre = /^[\w+~-]+(\.[\w+~-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/;
 	return emailre.test(value);
     },
 });
-- 
2.20.1




             reply	other threads:[~2021-04-23  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23  8:15 Lorenz Stechauner [this message]
2021-04-23  8:37 ` [pve-devel] applied: " Thomas Lamprecht

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=20210423081513.34071-1-l.stechauner@proxmox.com \
    --to=l.stechauner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal