-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
x/net/idna: support label separators other than ASCII dot #19603
Comments
This looks reasonable; at this point I would just mail the patch for review (people usually don't look at patches on the issue tracker). |
Thanks for your comment. |
This is now supported if you use any of the non-default profiles, which use the UTS #46 mappings pre-split so will normalize the dots any many other things you should do for proper IDNA support. Would this be sufficient or should one also allow splitting on dots when one is using the raw Punycode profile? |
@mpvl Thanks for your comment. I've updated the test case. https://go-review.googlesource.com/c/38284/#message-4bfc92dfa0159b20d2bd3cdf1d7249a1c324fc33
After reading the https://tools.ietf.org/html/rfc3490#section-4, I think we must normalize dots in raw Punycode profile. Also also the Registration profile must normalize dots instead of returning an error like |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Passed a string
"example\u3002jp"
toToASCII()
.What did you expect to see?
The return value is
"example.jp"
What did you see instead?
The return value was
"xn--examplejp-ck3h"
https://tools.ietf.org/html/rfc3490#section-3.1
I created a fix and add test cases at hnakamur/net@bd2fe13
I also followed the steps at Contribution Guide - The Go Programming Language and am ready to run
git mail
if this fix looks good to reviewers.Thanks!
The text was updated successfully, but these errors were encountered: