From: brian dot sulzen at aescreations dot com
Operating system: FreeBSD 6.3
PHP version: 5.2.11
PHP Bug Type: Filter related
Bug description: FILTER_VALID_EMAIL passes without top level domain
Description:
------------
FILTER_VALIDATE_EMAIL is passes addresses with out top level domain (i.e.,
.com, .net, etc).
Reproduce code:
---------------
<?php
$email_address = "test2_m...@example";
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
$email_address = "[email protected]";
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
$email_address = "[email protected]";
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
?>
Expected result:
----------------
bool(false)
string(21) "[email protected]"
string(21) "[email protected]"
Actual result:
--------------
string(18) "test2_m...@example"
string(21) "[email protected]"
string(21) "[email protected]"
--
Edit bug report at http://bugs.php.net/?id=50204&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50204&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50204&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50204&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50204&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50204&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50204&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50204&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50204&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50204&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50204&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50204&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50204&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50204&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50204&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50204&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50204&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50204&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50204&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50204&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50204&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50204&r=mysqlcfg