]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/JSONSchema.pm
sendmail: use more complete email regex and shellquote
[pve-common.git] / src / PVE / JSONSchema.pm
index 29ada5bc06570ea6853ca0736e303f5fd89befa5..5870b69507ac718823d74a57168afc893987c52e 100644 (file)
@@ -471,7 +471,7 @@ register_format('email', \&pve_verify_email);
 sub pve_verify_email {
     my ($email, $noerr) = @_;
 
-    if ($email !~ /^[\w\+\-\~]+(\.[\w\+\-\~]+)*@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*$/) {
+    if ($email !~ /^$PVE::Tools::EMAIL_RE$/) {
           return undef if $noerr;
           die "value does not look like a valid email address\n";
     }