Bug #57257 [Opn->Csd]: php_filter_validate_email()/php_filter_email() Inconsistency
| From: | cmb@php.net | Date: | Fri, 29 Jul 2016 23:43:52 +0000 |
| Subject: | Bug #57257 [Opn->Csd]: php_filter_validate_email()/php_filter_email() Inconsistency | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202712@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=57257&edit=1
ID: 57257
Updated by: cmb@php.net
Reported by: chris at dented-planet dot net
Summary: php_filter_validate_email()/php_filter_email()
Inconsistency
-Status: Open
+Status: Closed
Type: Bug
-Package: filter
+Package: Filter related
Operating System: Mac OS 10.4.7
PHP Version: 5.2.0
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
PECL/filter has been superseeded by ext/filter, so this issue
would affect FILTER_VALIDATE_EMAIL vs. FILTER_SANITIZE_EMAIL, but
it has already been resolved at least as of PHP 5.2.17, see
<https://github.com/php/php-src/blob/PHP-5.2/ext/filter/logical_filters.c#L525>.
Previous Comments:
------------------------------------------------------------------------
[2006-11-09 19:58:37] pierre dot php at gmail dot com
Yes, I'm also not sure about this issue. In theory, the sanitizing filters do not validate the
format but only clean up the data using a set of allowed characters for a given data type.
Logical filters validate the data and will return false if the format is not respected.
In short, we have read your report but were not sure about the best fix. It was not critical for
5.2.0 but we did not forget it :)
------------------------------------------------------------------------
[2006-11-09 15:51:13] chris at dented-planet dot net
I'm just checking back and noticed that there has been no reponse to this.
I'm curious- is this a bug or correct behavior?
------------------------------------------------------------------------
[2006-09-23 13:35:21] chris at dented-planet dot net
Description:
------------
While perusing the source code of the Filter extension, I noticed what I believe to be an
inconsistency between php_filter_validate_email() and php_filter_email().
php_filter_validate_email() is locale-dependent (via \w in the regexp) for the local-part of an
email address.
php_filter_email() is not locale-dependent.
This means that php_filter_validate_email() may allow characters (such as accent characters) that
php_filter_email() won't.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=57257&edit=1