URL IDN WPT failures
Categories
(Core :: Networking, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: edgul, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(2 files)
IdnaTestV2.window.js.ini notes the currently failing WPTs for URL IDN. They are also visible on the WPT dashboard.
Let's try to address the first four issues in this file.
[ToASCII("ä..c") A4_2 (ignored)]
expected: FAIL
[ToASCII("ä..c") A4_2 (ignored)]
expected: FAIL
[ToASCII("Ä..C") A4_2 (ignored)]
expected: FAIL
[ToASCII("Ä..C") A4_2 (ignored)]
expected: FAIL
If some of the other issues in this file turn out to be similar enough to fix we can include them here, otherwise we will create followup bugs.
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
Greg or Valentin,
How exactly are we using the interop-2023-url meta? Should this bug and others like it which are not necessarily included in the roadmap block the meta?
Comment 2•1 year ago
|
||
In this case, the fix probably belongs somewhere in nsIDNService.cpp
new URL("https://ä.\u00ad.c/x")
In this case U+00AD is soft hyphen which is supposed to be ignored by IDNA:
00AD ; ignored # SOFT HYPHEN
and the URL should be https://xn--4ca..c/x
I don't know if the issue lies in ICU or we do something wrong when the label becomes empty.
Assignee | ||
Comment 3•1 year ago
|
||
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, 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.
(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, 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.
Assignee | ||
Comment 5•1 year ago
|
||
This change gives us 46 new passes on the IdnaTestV2 test collection, with just 6 failures remaining
(to be resolved by the next patch).
Updated•1 year ago
|
Assignee | ||
Comment 6•1 year ago
|
||
Depends on D186866
Assignee | ||
Comment 7•1 year ago
|
||
Try run with the two patches above: https://treeherder.mozilla.org/jobs?repo=try&revision=4890ec2a04dd0194a44351a7309a1f8b12932c30
Comment 9•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1bd11b1176e6
https://hg.mozilla.org/mozilla-central/rev/19d62e534070
Description
•