r80913 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80912‎ | r80913 | r80914 >
Date:20:31, 24 January 2011
Author:hashar
Status:ok (Comments)
Tags:
Comment:
User::isValidEmailAddr comment update

Follow up r75682
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -638,9 +638,15 @@
639639 /**
640640 * Does a string look like an e-mail address?
641641 *
642 - * There used to be a regular expression here, it got removed because it
643 - * rejected valid addresses. Actually just check if there is '@' somewhere
644 - * in the given address.
 642+ * This validate an email address using an HTML5 specification found at:
 643+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
 644+ * Which as of 2011-01-24 says:
 645+ * A valid e-mail address is a string that matches the ABNF production
 646+ * 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined
 647+ * in RFC 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section
 648+ * 3.5.
 649+ * This function is an implementation of the specification as requested in
 650+ * bug 22449.
645651 *
646652 * @todo Check for RFC 2822 compilance (bug 959)
647653 *

Follow-up revisions

RevisionCommit summaryAuthorDate
r80919Tweak comments on User::isValidEmailAddr to replace the old @todo for RFC 282...brion21:18, 24 January 2011
r810001.17: MFT r80576, r80583, r80656, r80842, r80900, r80913, r80918, r80919, r80...catrope22:49, 25 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75682Follow up r75627. Implements r75670 in PHP to validate emails....hashar22:03, 29 October 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   21:19, 24 January 2011

Looks good! I added another tweak to replace the old @todo in r80919

Status & tagging log