Req #55865 [Opn->Csd]: email cyrillic symbols contains are not valid at filter_var function
| From: | cmb@php.net | Date: | Mon, 21 Nov 2016 14:25:18 +0000 |
| Subject: | Req #55865 [Opn->Csd]: email cyrillic symbols contains are not valid at filter_var function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205517@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55865&edit=1
ID: 55865
Updated by: cmb@php.net
Reported by: mitallast at gmail dot com
Summary: email cyrillic symbols contains are not valid at
filter_var function
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Filter related
Operating System: nix*, mac
PHP Version: 5.3.8
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Unicode in the local-part of email addresses is supported through
the FILTER_FLAG_EMAIL_UNICODE flag as of PHP 7.1.0, see
<https://3v4l.org/vVCS1>.
Support for IDN is already covered by request #39469, so I'm
closing this ticket.
Previous Comments:
------------------------------------------------------------------------
[2015-06-15 23:26:28] cmb@php.net
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, let alone local parts
with non ASCII characters; these are subject of RFC 6530-6533.
Therefore I'm switching to feature request, and do not mark this
ticket as duplicate of request #39469, because that request is
only about IDN support.
[1] <http://php.net/manual/en/filter.filters.validate.php>
------------------------------------------------------------------------
[2012-07-15 00:00:50] doomasmile at gmail dot com
Signed.
Function must be refactored.
http://en.wikipedia.org/wiki/.%D1%80%D1%84
------------------------------------------------------------------------
[2011-11-25 09:03:08] enderstd at gmail dot com
I think this behaviour is all right. There is a punycode form for IDN domains,
and
filter_var undestands it well enough, yet not without some issues. But I think
punycode is way to go.
http://en.wikipedia.org/wiki/Punycode
And by the way, "ÑеÑÑ@ÑеÑÑ.ÑÑ" is invalid email anyway,
because mailbox can't
contain IDN characters, I think it violates some basic SMTP RFC. Valid domain
would be like "test@ÑеÑÑ.ÑÑ".
------------------------------------------------------------------------
[2011-10-07 15:02:43] mitallast at gmail dot com
Description:
------------
Php contains filter_var function with predefined constaint FILTER_VALIDATE_EMAIL.
This function incorrect validate email with cyrrilic symbols.
Error can be at file "ext/filter/logical_filters.c" at function "void
php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL)"
Test script:
---------------
<?php
$value = "ÑеÑÑ@ÑеÑÑ.ÑÑ";
var_dump(filter_var($value, FILTER_VALIDATE_EMAIL));
Expected result:
----------------
(boolean)true
Actual result:
--------------
(boolean)false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55865&edit=1