Bug #69581 [Ver->Nab]: filter_var() FILTER_VALIDATE_EMAIL, E-Mail length

From: Date: Fri, 08 May 2015 06:12:52 +0000
Subject: Bug #69581 [Ver->Nab]: filter_var() FILTER_VALIDATE_EMAIL, E-Mail length
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192571@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69581&edit=1 ID: 69581 Updated by: rasmus@php.net Reported by: sebastian at dmwd dot de Summary: filter_var() FILTER_VALIDATE_EMAIL, E-Mail length -Status: Verified +Status: Not a bug Type: Bug Package: Filter related Operating System: Linux PHP Version: 5.6.8 Block user comment: N Private report: N New Comment: RFC 5322 section 4.5.3.1.1 states: The maximum total length of a user name or other local-part is 64 octets. This address is therefore invalid according to the strict interpretation of the RFC Previous Comments: ------------------------------------------------------------------------ [2015-05-06 11:50:34] cmb@php.net Apparently, the behavior has changed as of PHP 5.2.14/5.3.3: <http://3v4l.org/7iHni> ------------------------------------------------------------------------ [2015-05-06 06:04:20] sebastian at dmwd dot de Description: ------------ Validation of long e-mail addresses with filter_var and FILTER_VALIDATE_EMAIL fails. Test script: --------------- var_dump(filter_var('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@foo.com', FILTER_VALIDATE_EMAIL)); Expected result: ---------------- string(78) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@foo.com" Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69581&edit=1

« previous php.bugs (#192571) next »