Req #81628 [Opn->Sus]: Make intl IDNA 2008 compliant

From: Date: Wed, 17 Nov 2021 15:07:29 +0000
Subject: Req #81628 [Opn->Sus]: Make intl IDNA 2008 compliant
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237820@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81628&edit=1

 ID:                 81628
 Updated by:         cmb@php.net
 Reported by:        jbernard at cofomo dot com
 Summary:            Make intl IDNA 2008 compliant
-Status:             Open
+Status:             Suspended
 Type:               Feature/Change Request
 Package:            I18N and L10N related
 Operating System:   Linux and Windows
 PHP Version:        8.0.12
 Block user comment: N
 Private report:     N

 New Comment:

The ICU documentation[1] states:

| IDNA2008 is implemented according to UTS #46, […]

So that would be an upstream issue[2].  I suspend this ticket
until that is resolved.

[1] <https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uidna_8h.html#details>
[2] <https://unicode-org.atlassian.net/jira/software/c/projects/ICU/issues>


Previous Comments:
------------------------------------------------------------------------
[2021-11-16 20:00:31] jbernard at cofomo dot com

Description:
------------
I am conducted some tests on idn_to_ascii and idn_to_utf8 methods from intl extension. See the test
script example for $flags.

Those 2 methods are mainly used for domain names conversion and therefore should comply with IDNA
2008 (RFC 5891) and not only UTS#46.
During my tests, the following input domains were considered valid by idn_to_ascii while they
contain DISALLOWED character in IDNA 2008:
 - ????????????????????????????????.????????????
 - 〈普遍接受-测试.世界
 - Ė.ua-test.top

See https://util.unicode.org/UnicodeJsps/idna.jsp?a=%F0%90%8D%81%F0%90%8D%83%F0%90%8C%B9%F0%90%8C%BF%F0%90%8D%88%F0%90%8C%B3%F0%90%8C%B5%F0%90%8C%BF.%F0%90%8C%B2%F0%90%8D%88%F0%90%8C%BC%0D%0A%E3%80%88%E6%99%AE%E9%81%8D%E6%8E%A5%E5%8F%97-%E6%B5%8B%E8%AF%95.%E4%B8%96%E7%95%8C%0D%0A%C4%96.ua-test.top

Test script:
---------------
$result = idn_to_ascii($input,
    IDNA_DEFAULT
    | IDNA_USE_STD3_RULES
    | IDNA_CHECK_BIDI
    | IDNA_CHECK_CONTEXTJ
    | IDNA_NONTRANSITIONAL_TO_ASCII,
    INTL_IDNA_VARIANT_UTS46, $idnaInfo);
echo $result;

Expected result:
----------------
idn_to_ascii whould return null and $idn_info should contain error IDNA_ERROR_DISALLOWED with those
domains:
 - ????????????????????????????????.????????????
 - 〈普遍接受-测试.世界
 - Ė.ua-test.top

Actual result:
--------------
idn_to_ascii converts those domains to A-label without error.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81628&edit=1


Thread (2 messages)

« previous php.bugs (#237820) next »