]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
BUG12070: Its not possible to use the underscore in email addresses
authorAlexander Marx <alexander.marx@ipfire.org>
Tue, 18 Jun 2019 07:55:35 +0000 (09:55 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Jun 2019 08:12:49 +0000 (09:12 +0100)
Using IPFire's Mailservice does not allow to enter a senders mail address with the underscore.
The function used to verify that is used from general-functions.pl.
Now the function 'validemail' allows the underscore in the address.

Fixes: #12070
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/general-functions.pl

index 04e36969c431235d50e75519de7694e02596b974..aefcfb6878442555edc1b73cdaf5ceb8793c88ef 100644 (file)
@@ -784,7 +784,7 @@ sub validemail {
     return 0 if ( substr($parts[1],-1,1) eq '.' );
 
     #check first addresspart (before '@' sign)
-    return 0 if  ( $parts[0] !~ m/^[a-zA-Z0-9\.!\-\+#]+$/ );
+    return 0 if  ( $parts[0] !~ m/^[a-zA-Z0-9\.!\-\_\+#]+$/ );
 
     #check second addresspart (after '@' sign)
     return 0 if  ( $parts[1] !~ m/^[a-zA-Z0-9\.\-]+$/ );