|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57257 php_filter_validate_email()/php_filter_email() Inconsistency
Submitted: 2006-09-23 13:35 UTC Modified: 2016-07-29 23:43 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: chris at dented-planet dot net Assigned: cmb (profile)
Status: Closed Package: Filter related
PHP Version: 5.2.0 OS: Mac OS 10.4.7
Private report: No CVE-ID: None
 [2006-09-23 13:35 UTC] chris at dented-planet dot net
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-09 15:51 UTC] 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-11-09 19:58 UTC] 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 :)
 [2016-07-29 23:43 UTC]
-Status: Open +Status: Closed -Package: filter +Package: Filter related -Assigned To: +Assigned To: cmb
 [2016-07-29 23:43 UTC]
PECL/filter has been superseeded by ext/filter, so this issue
it has already been resolved at least as of PHP 5.2.17, see
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 14:01:30 2024 UTC