Bug 1845552 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Jonathan Kew [:jfkthame] from comment #3)
> I think the issue here is that nsIDNService::IDNA2008StringPrep is returning an error (as ICU has set an error code in the IDNA::Info) when the label ends up empty, but in this case we should just accept the empty label. Fixing that gives us 6 new passes on the IdnaTestV2 suite.
> 
> The remaining failures in IdnaTestV2 (the great majority of the current failures) arise because of [this line](https://searchfox.org/mozilla-central/rev/19500c006ebf8dc4587eef55357ae26b772391e1/netwerk/dns/nsIDNService.cpp#201), where the presence of a "hyphen error" in the IDNA info means that we will ignore any *other* errors that may also have been present. That seems wrong; we only want to ignore the hyphen error and return success if that was the only kind of error detected, but if others are present then IDNA2008StringPrep should still return a MALFORMED_URI error.
> 
> @Dylan, do you have work in progress on this? If not, I can post a patch to address these issues.

No, you can take it  : )
(In reply to Jonathan Kew [:jfkthame] from comment #3)
> I think the issue here is that nsIDNService::IDNA2008StringPrep is returning an error (as ICU has set an error code in the IDNA::Info) when the label ends up empty, but in this case we should just accept the empty label. Fixing that gives us 6 new passes on the IdnaTestV2 suite.
> 
> The remaining failures in IdnaTestV2 (the great majority of the current failures) arise because of [this line](https://searchfox.org/mozilla-central/rev/19500c006ebf8dc4587eef55357ae26b772391e1/netwerk/dns/nsIDNService.cpp#201), where the presence of a "hyphen error" in the IDNA info means that we will ignore any *other* errors that may also have been present. That seems wrong; we only want to ignore the hyphen error and return success if that was the only kind of error detected, but if others are present then IDNA2008StringPrep should still return a MALFORMED_URI error.
> 
> @Dylan, do you have work in progress on this? If not, I can post a patch to address these issues.

No, you can take it thanks.

Back to Bug 1845552 Comment 4