summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2012-02-01 14:38:02 (GMT)
committer Gábor Hojtsy2012-02-01 14:38:02 (GMT)
commit305bcc7d8d34e8716c5d5e481dd9b29e4542676f (patch)
treed8e8f3e8256e76a4060b5211699b98e4e260a728
parent4dbee0455169fe00585bf7edba656b7ce0ee2395 (diff)
Issue #12274 by markoshust, DamienMcKenna, seanbfuller, cburschka, aufumy: do not accept email addresses with dots at the end as valid
-rw-r--r--includes/common.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 58fe6ae..e6fdca7 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -996,7 +996,7 @@ function t($string, $args = array(), $langcode = NULL) {
*/
function valid_email_address($mail) {
$user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
- $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.?)+';
+ $domain = '(?:(?:[a-zA-Z0-9]|[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}';