-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/idna: context validation #30940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would like to add another case of what appears to be a false negative (xn--03c4b1a). The program is reporting: Error converting string: idna: invalid label "ิรืเ" Other IDNA utilities successfully convert a-label to u-label an viceversa |
@elmauromx can you confirm that this same issue happens on the latest version of Go? It looks like you are running on go1.11.5. |
@katiehockman . It is the same behavior with go1.12.1 for the first case reported: $HOME/go/bin/go version xn--diethealth-zp5i diet・health For xn--03c4b1a it is working good on the new version: xn--03c4b1a รืเ |
Hi. Any update on this? |
Is there any update on this? Any plans to fix it? |
@mpvl have you had a chance to look into this? Or is there another person that can investigate? |
FYI, calling Permalink to the method in current master; the method takes |
I looked into this. For now, the idna package implements UTS 46, which has no CONTEXTO requirement – though CONTEXTJ checks are widely deployed. We could certainly add a flag for CONTEXTO support though, for registration profiles. Here's what icu4j's documentation says about CONTEXTO:
|
Change https://golang.org/cl/317729 mentions this issue: |
Previously, it always enabled transitional processing instead of toggling, despite the fact that it took a boolean argument. For golang/go#30940. Change-Id: I00ad51ec55abfb2de28deb8c98f949989ece1099 Reviewed-on: https://go-review.googlesource.com/c/text/+/317729 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Trust: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Fixed by https://golang.org/cl/360381. |
Maybe fixed? Is the issue here just that |
https://golang.org/cl/360381 only fixes part of the bug. The original bug here is the lack of CONTEXTO support, which is not yet added, and which should only be used for the Registration profile. Adding CONTEXTO support essentially means implementing the restrictions in Appendices A.3–9 in RFC 5892. Notice that we already support CONTEXTJ through CheckJoiners, which is enabled by both ValidateForRegistration and MapForLookup (through ValidateLabels). |
Previously, it always enabled transitional processing instead of toggling, despite the fact that it took a boolean argument. For golang/go#30940. Change-Id: I00ad51ec55abfb2de28deb8c98f949989ece1099 Reviewed-on: https://go-review.googlesource.com/c/text/+/317729 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Trust: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Go Bot <gobot@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I wrote an example to convert a-label to u-label an viceversa and also perform IDNA2008 validation based on the provided a-label.
I checked the results with other IDNA tools and found that with net/idna I am not getting context errors that other libraries are reporting.
Here is the main code of the example:
Here are some label examples:
Can you please confirm if this is missing validation of IDNA2008?
Could it be possible to include one new method/flag to get full IDNA2008 validation with the function?
What did you expect to see?
Here are the errors reported for 2 other idna utilities:
What did you see instead?
The text was updated successfully, but these errors were encountered: