Permalink
Browse files

Issue #12274 by markoshust, DamienMcKenna, seanbfuller, cburschka, au…

…fumy: do not accept email addresses with dots at the end as valid
  • Loading branch information...
1 parent 4dbee04 commit 305bcc7d8d34e8716c5d5e481dd9b29e4542676f @goba goba committed Feb 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 includes/common.inc
View
@@ -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}';

0 comments on commit 305bcc7

Please sign in to comment.