Edit report at http://bugs.php.net/bug.php?id=55008&edit=1
ID: 55008 Updated by: [email protected] Reported by: zedorg at gmail dot com Summary: PHP Filter email doesn't work for facebook emails -Status: Open +Status: Bogus Type: Bug Package: Filter related Operating System: x86_64 GNU/Linux PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: 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 The filter extension uses a regular expression based on RFC 5321, which like you found, says that the limit on a local-part of an e-mail is 64 octets. [1] http://lxr.php.net/xref/PHP_5_3/ext/filter/logical_filters.c#499 [2] http://tools.ietf.org/html/rfc5321#section-4.5.3.1 Previous Comments: ------------------------------------------------------------------------ [2011-06-07 16:29:39] zedorg at gmail dot com Checked rfc, if this is the good one http://tools.ietf.org/html/rfc5321 , and it says "The maximum total length of a user name or other local-part is 64 octets." However facebook uses 70? ------------------------------------------------------------------------ [2011-06-07 16:25:07] zedorg at gmail dot com Description: ------------ Hello, it seems the filter function is not working the "new" facebook emails like: apps+xxxxxxxxxxxxxxx.xxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx...@proxymail.facebook.com where x is an alpha numeric character. It returns false. This new feature comes from 2010 January, see: http://www.allfacebook.com/facebook-developers-prepare-to-gain-access-to-user-emails-2010-01 We got a lot of validation failures, cause of this, from facebook connected users, when we trying to use filter_var on these emails. A bit strange, cause if I change the "apps+xxxxxxxxxxxxxxx" to "apps+xxxxxxxxxx", 5 letter shorted, it accepts. However this won't help us :) Test script: --------------- <?php var_dump(filter_var("apps+xxxxxxxxxxxxxxx.xxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx...@proxymail.facebook.com", FILTER_VALIDATE_EMAIL)); Expected result: ---------------- It should return the given email address. Actual result: -------------- Returns false. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=55008&edit=1
