|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #81628 Make intl IDNA 2008 compliant
Submitted: 2021-11-16 20:00 UTC Modified: 2021-11-17 15:07 UTC
From: jbernard at cofomo dot com Assigned:
Status: Suspended Package: I18N and L10N related
PHP Version: 8.0.12 OS: Linux and Windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-11-16 20:00 UTC] jbernard at cofomo dot com
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:
 - ????????????????????????????????.????????????
 - 〈普遍接受-测试.世界
 - Ė


Test script:
$result = idn_to_ascii($input,
    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:
 - ????????????????????????????????.????????????
 - 〈普遍接受-测试.世界
 - Ė

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-17 15:07 UTC]
-Status: Open +Status: Suspended
 [2021-11-17 15:07 UTC]
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] <>
[2] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 20:01:28 2024 UTC