public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 widget-toolkit] toolkit: update email regex for acme account
@ 2021-04-23  8:15 Lorenz Stechauner
  2021-04-23  8:37 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenz Stechauner @ 2021-04-23  8:15 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-23  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23  8:15 [pve-devel] [PATCH v2 widget-toolkit] toolkit: update email regex for acme account Lorenz Stechauner
2021-04-23  8:37 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal