Bug #68659 [Com]: VALIDATE_EMAIL max length
Edit report at https://bugs.php.net/bug.php?id=68659&edit=1
ID: 68659
Comment by: support at camolist dot com
Reported by: support at camolist dot com
Summary: VALIDATE_EMAIL max length
Status: Not a bug
Type: Bug
Package: Filter related
PHP Version: 5.6.4
Block user comment: N
Private report: N
New Comment:
including the very article cited in the php source code ("The regex below is based on a regex
by Michael Rushton" IE http://squiloople.com/2009/12/20/email-address-validation/)
there are many documented reasons behind the 254 limit available all over the internet
what is the point of the filter validate email if it lets addresses clearly outside of the standard
validate?
and while on that topic filter_validate email completely ignores the standards behind allowing
unicode in email addresses
Previous Comments:
------------------------------------------------------------------------
[2014-12-30 02:17:35] aharvey@php.net
We don't document that limit, so the idea that e-mail addresses >254 characters may be
validated seems to be expected behaviour to me.
Closing not a bug.
------------------------------------------------------------------------
[2014-12-27 00:32:57] support at camolist dot com
string(258)
""xxxx"."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxx.com"
string(260)
""xxxx"."xx"."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxx.com"
etc etc etc also all validate as valid emails (take one local character away for every dot separated
quoted group you add
------------------------------------------------------------------------
[2014-12-27 00:14:25] support at camolist dot com
Description:
------------
following along with http://squiloople.com/2009/12/20/email-address-validation/
(php uses this syntax for the filter)
"limiting the entire length to 254 characters"
254 is brought up several times yet the following code validates and is 256 characters
caused trouble for mysql setting a column to 254 expecting that to be the max size
Test script:
---------------
var_dump(filter_var('"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxx.com',FILTER_VALIDATE_EMAIL));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68659&edit=1
Thread (7 messages)