php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71350 Possible bugs and change requests about idna functions
Submitted: 2016-01-12 11:38 UTC Modified: 2021-11-11 11:17 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nospampls at example dot org Assigned:
Status: Open Package: I18N and L10N related
PHP Version: 7.0.2 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nospampls at example dot org
New email:
PHP Version: OS:

 

 [2016-01-12 11:38 UTC] nospampls at example dot org
Description:
------------
Firstly, not really important,
IDNA_NONTRANSITIONAL_TO_ASCII
IDNA_NONTRANSITIONAL_TO_UNICODE
should be merged into a single constant if possible.
The reason ICU have both is that IDNA configuration is shared for both encoding and decoding. PHP has two separate functions, one constant would be enough.

The constant DOMAIN_NAME_TOO_LONG doesn't look to be actually used ever. Since the functions just return false (without populating $info, when intl.exceptions is off) or throw a generic exception. I would suggest to always populate $info and include this error when intl.exceptions is off.

Same goes with idna_to_*("" /* empty string */, ..., ..., $info), rather than just returning false (and throw an exception if they are enabled), i would expect it to populate $info with the IDNA_ERROR_EMPTY_LABEL set (as happens with raw ICU).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-11 11:17 UTC] nikic@php.net
-Package: intl +Package: I18N and L10N related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC