Req #39469 [Opn->Csd]: FILTER_VALIDATE_EMAIL does not accept IDN domain names
Edit report at http://bugs.php.net/bug.php?id=39469&edit=1
ID: 39469
Updated by: aharvey@php.net
Reported by: christoph at ziegenberg dot de
Summary: FILTER_VALIDATE_EMAIL does not accept IDN domain
names
-Status: Open
+Status: Closed
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: WinXP SP2
PHP Version: 5.2.0
-Assigned To:
+Assigned To: aharvey
Block user comment: N
New Comment:
This has since been fixed, and works in the current 5.2 and 5.3
releases.
Previous Comments:
------------------------------------------------------------------------
[2006-11-11 11:19:54] christoph at ziegenberg dot de
Description:
------------
The filter FILTER_VALIDATE_EMAIL does not accept IDN domain names, so
valid email addresses are not accepted, the punycode version works.
I know the check for this is a little bit complex, because the allowed
chars in the domain name depend on the TLD.
I think the current behavior is okay as default, but there should be an
option to allow IDN domain names.
Reproduce code:
---------------
<?php
var_dump(filter_var('test@tätärätää.de', FILTER_VALIDATE_EMAIL));
var_dump(filter_var('test@xn--ttrt-loabbba.de',
FILTER_VALIDATE_EMAIL));
?>
Expected result:
----------------
string(...) "..."
string(...) "..."
Actual result:
--------------
bool(false)
string(...) "..."
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=39469&edit=1
Thread (9 messages)