Bug #71893 [NEW]: Valid email address rejected by FILTER_VAR
From: bfarber at invisiopower dot com
Operating system: CentOS / Windows
PHP version: 5.5.33
Package: Filter related
Bug Type: Bug
Bug description:Valid email address rejected by FILTER_VAR
Description:
------------
I have a valid email address that is being rejected by filter_var on two
different servers. If this has already been addressed, I apologize in
advance for the duplicate bug report. I've tested with 5.5.12 and 5.4.43
with the same results, and I don't have another environment loaded right
now with a more recent version of PHP. That said, I looked through the
changelog and no fixes stood out after 5.5.12 that would address this
issue.
The example email address is
loop-300mcconvillerdlisti-Folder-b5d8dbce-201f-4fdb-be88-ea6b9a486736z55662107@upload.dotloop.com.
This is an email provided by a newer service "DotLoop" but when we
attempt to validate the email address on our end it fails. The email
address is valid and has nothing out of the ordinary going on with it.
I did note several past bugs related to dash symbols and/or multiple
dash symbols in the email address, so that may be relevant here since
the email address has multiple dash symbols.
Test script:
---------------
<?php
$email =
"loop-300mcconvillerdlisti-Folder-b5d8dbce-201f-4fdb-be88-ea6b9a486736z55662107@upload.dotloop.com";
var_dump( filter_var( $email, FILTER_VALIDATE_EMAIL ) );
Expected result:
----------------
filter_var should return the email address as provided
Actual result:
--------------
filter_var returns FALSE
--
Edit bug report at https://bugs.php.net/bug.php?id=71893&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71893&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71893&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71893&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71893&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71893&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71893&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71893&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71893&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71893&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71893&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71893&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71893&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71893&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71893&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71893&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71893&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71893&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71893&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71893&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71893&r=mysqlcfg
Thread (2 messages)
- bfarber at invisiopower dot com