- Another improvement to the e-mail address validation code. Fixed Debian

bug #185217.  Patch by Gerhard.
4.2.x
Dries Buytaert 2003-03-19 17:34:27 +00:00
parent 2976bc59f0
commit 65b6203700
2 changed files with 4 additions and 4 deletions

View File

@ -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}';

View File

@ -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}';