ID:               47270
 Updated by:       johan...@php.net
 Reported By:      jason at netmums dot com
 Status:           Bogus
 Bug Type:         Filter related
 Operating System: RHEL 5.3
 PHP Version:      5.2.8
 New Comment:

Just checking TLD isn't enough - actually we'd have to make a NS lookup
but that's certainly outside the things of filter. The filter is for
making sure nothing bad happens when using the value not checking
whether the user couldn't type his name.


Previous Comments:
------------------------------------------------------------------------

[2009-02-02 15:30:37] jason at netmums dot com

Thanks, perhaps a flag could be added to test against valid public TLDs

supported by IANA versus technically valid internal addresses?

------------------------------------------------------------------------

[2009-02-02 14:23:26] johan...@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

That domain might exist at your network.

------------------------------------------------------------------------

[2009-02-02 09:44:42] jason at netmums dot com

Description:
------------
An email address is submitted to filter_var and returned as valid 
despite the domain being invalid. There are no single character top-
level domains.

Reproduce code:
---------------
$email = 'testu...@hotmail.co.u';
if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
echo "Invalid email address.";
} else {
echo "Valid email address.";
}



Expected result:
----------------
Invalid email address.

Actual result:
--------------
Valid email address.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47270&edit=1

Reply via email to