php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70792 FILTER_VALIDATE_EMAIL have limit for 64 characters on the user part
Submitted: 2015-10-26 14:16 UTC Modified: 2015-10-26 19:17 UTC
From: nadavvin at gmail dot com Assigned:
Status: Not a bug Package: Filter related
PHP Version: 5.6.14 OS: windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nadavvin at gmail dot com
New email:
PHP Version: OS:

 

 [2015-10-26 14:16 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-26 16:35 UTC] 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 19:17 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2015-10-26 19:17 UTC] requinix@php.net
That.
 [2015-10-27 05:38 UTC] a at b dot c dot de
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_.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 09:01:26 2024 UTC