#51072 [NEW]: filter_var with FILTER_VALIDATE_EMAIL accepts incorrect emails
| From: | schicker03 at gmail dot com | Date: | Wed, 17 Feb 2010 17:32:38 +0000 |
| Subject: | #51072 [NEW]: filter_var with FILTER_VALIDATE_EMAIL accepts incorrect emails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-147793@lists.php.net to get a copy of this message | ||
From: schicker03 at gmail dot com
Operating system: Linux
PHP version: 5.2.12
PHP Bug Type: Unknown/Other Function
Bug description: filter_var with FILTER_VALIDATE_EMAIL accepts incorrect emails
Description:
------------
An incorrect email is returned as correct from filter_var with the
FILTER_VALIDATE_EMAIL option.
The php version is
"PHP Version 5.2.0-8+etch10"
that has not been in the dropdown above so i added it here.
Reproduce code:
---------------
---
From manual page: function.filter-var
---
<?php
/*
* note the missing t in the domain part
* false : @-online.de
* correct: @t-online.de
*/
$email = "doesnotmatter@-online.de"
$abc = filter_var($email, FILTER_VALIDATE_EMAIL);
var_dump($abc);
?>
Expected result:
----------------
The variable $abc should be the boolean value false.
Actual result:
--------------
The variable $abc contains the email from $email
"doesnotmatter@-online.de".
--
Edit bug report at http://bugs.php.net/?id=51072&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51072&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51072&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51072&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51072&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51072&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51072&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51072&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51072&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51072&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51072&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51072&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51072&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51072&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51072&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51072&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51072&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51072&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51072&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51072&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51072&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51072&r=mysqlcfg