From e1be34e477f9abfacd42cbf7d8350e287af82757 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 24 Jan 2011 20:31:16 +0000 Subject: [PATCH] User::isValidEmailAddr comment update Follow up r75682 --- includes/User.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/User.php b/includes/User.php index 184362db91..104d0623cb 100644 --- a/includes/User.php +++ b/includes/User.php @@ -638,9 +638,15 @@ class User { /** * Does a string look like an e-mail address? * - * There used to be a regular expression here, it got removed because it - * rejected valid addresses. Actually just check if there is '@' somewhere - * in the given address. + * This validate an email address using an HTML5 specification found at: + * http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address + * Which as of 2011-01-24 says: + * A valid e-mail address is a string that matches the ABNF production + * 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined + * in RFC 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section + * 3.5. + * This function is an implementation of the specification as requested in + * bug 22449. * * @todo Check for RFC 2822 compilance (bug 959) * -- 2.20.1