Bug #70792 [Com]: FILTER_VALIDATE_EMAIL have limit for 64 characters on the user part

From: Date: Tue, 27 Oct 2015 05:38:42 +0000
Subject: Bug #70792 [Com]: FILTER_VALIDATE_EMAIL have limit for 64 characters on the user part
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196839@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70792&edit=1 ID: 70792 Comment by: a at b dot c dot de Reported by: nadavvin at gmail dot com Summary: FILTER_VALIDATE_EMAIL have limit for 64 characters on the user part Status: Not a bug Type: Bug Package: Filter related Operating System: windows PHP Version: 5.6.14 Block user comment: N Private report: N New Comment: RFC 4.5.3.1 "Every implementation MUST be able to receive objects of at least these sizes. .... To the maximum extent possible, implementation techniques that impose no limits on the length of these objects should be used." In other words, just because you _can_ impose the restriction, doesn't mean you _should_. Previous Comments: ------------------------------------------------------------------------ [2015-10-26 19:17:04] requinix@php.net That. ------------------------------------------------------------------------ [2015-10-26 16:35:09] php at sogetthis dot com RFC5321 4.5.3.1.1: The maximum total length of a user name or other local-part is 64 octets. ------------------------------------------------------------------------ [2015-10-26 14:16:09] nadavvin at gmail dot com Description: ------------ filter_var with FILTER_VALIDATE_EMAIL failed when user part of email is longer than 64 characters. Test script: --------------- php -r "echo filter_var('123456789012345678901234567890abcderghjklpoinhyxxxxxxxxxxxxxxxxx@gmailxx.com', FILTER_VALIDATE_EMAIL) ? 'True' : 'False';" php -r "echo filter_var('123456789012345678901234567890abcderghjklpoinhyxxxxxxxxxxxxxxxxxx@gmail.com', FILTER_VALIDATE_EMAIL) ? 'True' : 'False';" Expected result: ---------------- True True Actual result: -------------- True False ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70792&edit=1

« previous php.bugs (#196839) next »