summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-03-19 17:34:27 +0000
committerDries Buytaert <dries@buytaert.net>2003-03-19 17:34:27 +0000
commit65b620370014467303021c4d4db939e5af3e9d0b (patch)
tree3b7f2ff7b98ff9cd148febf859b5d78c3659b546
parent2976bc59f02e347a3605f81e51569f12a7c5bae1 (diff)
downloadbrdo-65b620370014467303021c4d4db939e5af3e9d0b.tar.gz
brdo-65b620370014467303021c4d4db939e5af3e9d0b.tar.bz2
- Another improvement to the e-mail address validation code. Fixed Debian
bug #185217. Patch by Gerhard.
-rw-r--r--modules/user.module4
-rw-r--r--modules/user/user.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/user.module b/modules/user.module
index f4ebe3fbd..8dd81ae35 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -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}';
diff --git a/modules/user/user.module b/modules/user/user.module
index f4ebe3fbd..8dd81ae35 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -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}';