Req #39469 [Csd->ReO]: FILTER_VALIDATE_EMAIL does not accept IDN domain names
Edit report at https://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: Closed
+Status: Re-Opened
Type: Feature/Change Request
-Package: *General Issues
+Package: Filter related
Operating System: WinXP SP2
PHP Version: 5.2.0
-Assigned To: aharvey
+Assigned To:
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2014-07-15 16:46:59] drogolov at gmail dot com
Any news? Still not fixed.
------------------------------------------------------------------------
[2013-03-04 14:42:50] dean at deansas dot org
This doesn't seem to be fixed. Please reopen.
dean@ernie:~$ php -r "var_dump(filter_var('fred@bücher.ch',
FILTER_VALIDATE_EMAIL));"
bool(false)
Using:
PHP 5.3.10-1ubuntu3.5 with Suhosin-Patch (cli) (built: Jan 18 2013 23:40:19)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
------------------------------------------------------------------------
[2010-09-27 05:13:24] aharvey@php.net
This has since been fixed, and works in the current 5.2 and 5.3 releases.
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=39469&edit=1
Thread (9 messages)