[wp-trac] [WordPress Trac] #62038: Issue with is_email() and sanitize_email()

WordPress Trac noreply at wordpress.org
Wed Sep 11 22:00:30 UTC 2024


#62038: Issue with is_email() and sanitize_email()
-------------------------------+-----------------------------
 Reporter:  debarghyabanerjee  |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Formatting         |    Version:
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 It has been observed that certain email addresses are passing through the
 validation and sanitization processes with trailing numbers appended to
 them, such as:

 `example at example.com1234`
 `example at example.com1234567812345678`

 Also, `example at 204.32.222.14` is validated as a valid email by `is_email`

 Currently, the `is_email` and `sanitize_email` functions are not handling
 these cases as expected. Importantly, according to `RFC 5321`, email
 validation rules dictate that only IP addresses enclosed in square
 brackets are considered valid domains. This RFC standard is currently not
 enforced correctly, leading to cases where email addresses like
 `abc at 204.32.222.14` are improperly validated as valid.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62038>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list