Bug #53722 [Bgs]: FILTER_VALIDATE_EMAIL fails on numeric TLDs
Edit report at http://bugs.php.net/bug.php?id=53722&edit=1
ID: 53722
User updated by: romain dot riviere at gmail dot com
Reported by: romain dot riviere at gmail dot com
Summary: FILTER_VALIDATE_EMAIL fails on numeric TLDs
Status: Bogus
Type: Bug
Package: Filter related
Operating System: Linux
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
There ARE numeric TLDs, even though they are not made public. I have one
on my
LAN.
The filter should probably not rely on what is believed to exist, but on
what is
technically feasible.
In other words, if I can get email on the address johndoe@domain.123
(and again,
YES, it works), then FILTER_VALIDATE_EMAIL should not reject such an
address.
Previous Comments:
------------------------------------------------------------------------
[2011-01-18 14:03:15] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
There are no numeric TLDs, the e-mail filters supports IP based e-mail
addresses
however.
------------------------------------------------------------------------
[2011-01-12 13:48:58] romain dot riviere at gmail dot com
Description:
------------
Although FILTER_VALIDATE_EMAIL accepts non-existent TLDs, it refuses to
validate
numeric TLDs.
AFAIK, there is no technical justification for this: numeric TLDs just
work out of
the box as far as the DNS know about them.
I suggest that the filter should validate numeric TLDs, or that a
FILTER_FLAG_ALLOW_NUMTLD be created to alter the default behaviour of
the filter.
Test script:
---------------
filter_var("johndoe@domain.123", FILTER_SANITIZE_EMAIL) ; // returns
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53722&edit=1
Thread (7 messages)