- Another improvement to the e-mail address validation code. Fixed Debian
bug #185217. Patch by Gerhard.4.2.x
parent
2976bc59f0
commit
65b6203700
|
@ -184,10 +184,10 @@ function user_validate_mail($mail) {
|
|||
|
||||
/*
|
||||
** Verify the syntax of the given e-mail address. Empty e-mail addresses
|
||||
** allowed.
|
||||
** allowed. See RFC 2822 for details.
|
||||
*/
|
||||
|
||||
$user = '[a-zA-Z0-9_\-\.\+]+';
|
||||
$user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
|
||||
$domain = '(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\.?)+';
|
||||
$ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
|
||||
$ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
|
||||
|
|
|
@ -184,10 +184,10 @@ function user_validate_mail($mail) {
|
|||
|
||||
/*
|
||||
** Verify the syntax of the given e-mail address. Empty e-mail addresses
|
||||
** allowed.
|
||||
** allowed. See RFC 2822 for details.
|
||||
*/
|
||||
|
||||
$user = '[a-zA-Z0-9_\-\.\+]+';
|
||||
$user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
|
||||
$domain = '(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\.?)+';
|
||||
$ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
|
||||
$ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
|
||||
|
|
Loading…
Reference in New Issue