Bug->Req #65027 [Ana->Dup]: FILTER_VALIDATE_EMAIL does not accept IDN domain names
| From: | cmb@php.net | Date: | Mon, 15 Jun 2015 23:16:41 +0000 |
| Subject: | Bug->Req #65027 [Ana->Dup]: FILTER_VALIDATE_EMAIL does not accept IDN domain names | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-193529@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65027&edit=1
ID: 65027
Updated by: cmb@php.net
Reported by: info at iwebsoft dot de
Summary: FILTER_VALIDATE_EMAIL does not accept IDN domain
names
-Status: Analyzed
+Status: Duplicate
-Type: Bug
+Type: Feature/Change Request
-Package: Mail related
+Package: Filter related
Operating System: PHP 5.3.10-1ubuntu3.6 with Suhos
PHP Version: 5.5.0RC3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Actually, this is not a bug, because the documentation[1] states:
| In general, this validates e-mail addresses against the syntax
| in RFC 822, [...]
However, IDNs are not allowed by RFC 822. Therefore I'm switching
to feature request, and marking this ticket as duplicate of
request #39469.
[1] <http://php.net/manual/en/filter.filters.validate.php>
Previous Comments:
------------------------------------------------------------------------
[2013-06-13 14:27:11] rasmus@php.net
An easy workaround is to just call idn_to_ascii() on the address you pass to the
filter.
------------------------------------------------------------------------
[2013-06-13 09:24:28] info at iwebsoft dot de
Description:
------------
The filter FILTER_VALIDATE_EMAIL does not accept IDN domain names, so valid email addresses are not
accepted.
Test script:
---------------
var_dump(filter_var('test@täst.de', FILTER_VALIDATE_EMAIL));
Expected result:
----------------
string(13) "test@täst.de"
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65027&edit=1