Bug #78958 [Nab]: FILTER_VALIDATE_EMAIL fails on a valid email address

From: Date: Fri, 13 Dec 2019 17:52:59 +0000
Subject: Bug #78958 [Nab]: FILTER_VALIDATE_EMAIL fails on a valid email address
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224282@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78958&edit=1

 ID:                 78958
 Updated by:         cmb@php.net
 Reported by:        kaulkwappe dot php-bugs at prvy dot eu
 Summary:            FILTER_VALIDATE_EMAIL fails on a valid email address
 Status:             Not a bug
 Type:               Bug
 Package:            Filter related
 Operating System:   Debian Buster 10.2
 PHP Version:        7.3.11
 Block user comment: N
 Private report:     N

 New Comment:

While the documentation of FILTER_VALIDATE_EMAIL claims it would
validate against the syntax in RFC 822, that has obviously been
changed with the fix for bug #49576.


Previous Comments:
------------------------------------------------------------------------
[2019-12-13 15:48:26] kaulkwappe dot php-bugs at prvy dot eu

Seems then to be a bug of the PHP mailing lists (https://www.php.net/mailing-lists.php) since they
return such invalid email addresses.

------------------------------------------------------------------------
[2019-12-13 15:42:22] requinix@php.net

According to RFC 5321, the local part of an email address (before the @) is limited to 64
characters.
https://tools.ietf.org/html/rfc5321#section-4.5.3.1.1

------------------------------------------------------------------------
[2019-12-13 15:15:48] cmb@php.net

Confirmed: <https://3v4l.org/eikec>.

------------------------------------------------------------------------
[2019-12-13 11:55:15] kaulkwappe dot php-bugs at prvy dot eu

Description:
------------
---
From manual page: https://php.net/filter.filters.validate
---


Test script:
---------------
$email =
'php-announce-sc.123456.abcabcabcabcabcabc-abcabcabc-php=example.com@lists.php.net';
var_dump(filter_var($email, FILTER_VALIDATE_EMAIL));

Expected result:
----------------
Should return validate and return the string.

Actual result:
--------------
Does not validate. Returns
> bool(false)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78958&edit=1


Thread (6 messages)

« previous php.bugs (#224282) next »