[wp-trac] [WordPress Trac] #44191: is_email() function accepts non RFC822

WordPress Trac noreply at wordpress.org
Wed May 23 08:27:20 UTC 2018


#44191: is_email() function accepts non RFC822
--------------------------+------------------------------
 Reporter:  vonsch        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by vonsch):

 I was also surprised, but checked RFC822 and unfortunately you are wrong.
 Here it is [https://www.w3.org/Protocols/rfc822/ RFC822]

 6.1. Syntax
 local-part  =  word *("." word)             ; uninterpreted ; case-
 preserved

 3.3. LEXICAL TOKENS
 word        =  atom / quoted-string
 atom        =  1*<any CHAR except specials, SPACE and CTLs>

 Even though `'.'` is no special per atom, it is special in the `word *("."
 word)` rule, as at least one atom is expected as a word. So according to
 the specs `foo.bar. at gmail.com` is incorrect, but `foo.bar.. at gmail.com`
 might be correct.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44191#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list