Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#15379 closed defect (bug) (duplicate)

is_email should be RFC complient

Reported by: jorbin's profile jorbin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: needs-unit-test
Focuses: Cc:

Description

#blamenacin

Attachments (2)

email.php (8.8 KB) - added by jorbin 13 years ago.
email.patch (8.8 KB) - added by jorbin 13 years ago.

Download all attachments as: .zip

Change History (11)

@jorbin
13 years ago

#1 @ryanduff
13 years ago

I like this alot.

#2 @westi
13 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #4616

@jorbin
13 years ago

#3 @ryan
13 years ago

Viewing that regex will insert a malicious easter egg in your brain.

#4 @mrmist
13 years ago

There are alot of slashes in that patch. Can we use less? They are a natural resource after all.

#5 @nacin
13 years ago

Willing to commit this if you can produce 100% unit test coverage. I'll wait.

#6 @jorbin
13 years ago

  • Keywords needs-unit-test added

This patch has one main flaw and that is the lack of a capital P I think it needs-improvement

#7 @coffee2code
13 years ago

Hmm, looks like that one parenthesis is out of place...

#8 follow-up: @filosofo
13 years ago

If we wait until 3.2 with PHP 5.x, we can just do

filter_var( $email, FILTER_VALIDATE_EMAIL ) instead, right?

#9 in reply to: ↑ 8 @nacin
13 years ago

  • Milestone Awaiting Review deleted

Replying to filosofo:

If we wait until 3.2 with PHP 5.x, we can just do

filter_var( $email, FILTER_VALIDATE_EMAIL ) instead, right?

Probably not. Those can be buggy. We could potentially leverage it internally but we need to watch out for vulnerabilities and what not across PHP versions.

Note: See TracTickets for help on using tickets.