r80919 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80918‎ | r80919 | r80920 >
Date:21:18, 24 January 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
Tweak comments on User::isValidEmailAddr to replace the old @todo for RFC 2822 validation with a brief explanation of why we're using this instead. (followup r80913)
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -638,18 +638,26 @@
639639 /**
640640 * Does a string look like an e-mail address?
641641 *
642 - * This validate an email address using an HTML5 specification found at:
 642+ * This validates an email address using an HTML5 specification found at:
643643 * http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
644644 * Which as of 2011-01-24 says:
 645+ *
645646 * A valid e-mail address is a string that matches the ABNF production
646647 * 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined
647648 * in RFC 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section
648649 * 3.5.
 650+ *
649651 * This function is an implementation of the specification as requested in
650652 * bug 22449.
651653 *
652 - * @todo Check for RFC 2822 compilance (bug 959)
 654+ * Client-side forms will use the same standard validation rules via JS or
 655+ * HTML 5 validation; additional restrictions can be enforced server-side
 656+ * by extensions via the 'isValidEmailAddr' hook.
653657 *
 658+ * Note that this validation doesn't 100% match RFC 2822, but is believed
 659+ * to be liberal enough for wide use. Some invalid addresses will still
 660+ * pass validation here.
 661+ *
654662 * @param $addr String E-mail address
655663 * @return Bool
656664 */

Follow-up revisions

RevisionCommit summaryAuthorDate
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
r80913User::isValidEmailAddr comment update...hashar20:31, 24 January 2011

Comments

#Comment by Hashar (talk | contribs)   21:32, 24 January 2011

Thanks brion.

Status & tagging log