From: andrew dot nicols at luns dot net dot uk Operating system: Debian PHP version: 5.2.11 PHP Bug Type: Filter related Bug description: FILTER_VALIDATE_EMAIL incorrectly marks an address as valid if it contains =
Description:
------------
The filter_var function, when used with FILTER_VALIDATE_EMAIL marks an
email address with an = in it as invalid.
According to RFCs 822, 2822 and 5322, = is a valid component to the
local-part of an e-mail address.
Reproduce code:
---------------
<?php
$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));
$email_address = "[email protected]";
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
?>
Expected result:
----------------
string(21) "[email protected]"
string(21) "[email protected]"
string(21) "[email protected]"
Actual result:
--------------
bool(false)
string(21) "[email protected]"
string(21) "[email protected]"
--
Edit bug report at http://bugs.php.net/?id=50158&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50158&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50158&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50158&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50158&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50158&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50158&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50158&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50158&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50158&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50158&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50158&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50158&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50158&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50158&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50158&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50158&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50158&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50158&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50158&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50158&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50158&r=mysqlcfg
