Bug #68659 [Opn->Nab]: VALIDATE_EMAIL max length
Edit report at https://bugs.php.net/bug.php?id=68659&edit=1
ID: 68659
Updated by: aharvey@php.net
Reported by: support at camolist dot com
Summary: VALIDATE_EMAIL max length
-Status: Open
+Status: Not a bug
Type: Bug
Package: Filter related
PHP Version: 5.6.4
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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)