-
Notifications
You must be signed in to change notification settings - Fork 302
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/text: *Profile.process to throw labelError if verifyDNSLength = true and s ends with trailing dot. #43
base: master
Are you sure you want to change the base?
Conversation
…rifyDNSLength is false. The existing implementation always skips the empty last label regardless of what verifyDNSLength is set to, which causes pure-ASCII domains ending with a single empty root label to be wrongly accepted when verifyDNSLength is true. This behavior is described in the Unicode Technical Standard 46 at https://unicode.org/reports/tr46/\#ToASCII Fixes golang/go#47182
This PR (HEAD: f99f2cf) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/text/+/504255 to see it. Tip: You can toggle comments from me using the |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/504255. |
Message from Marcel van Lohuizen: Patch Set 1: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/504255. |
As per golang/go#58778 (comment): The root label should be disallowed when VerifyDNSLength is true, so |
…and s ends with trailing dot. From UTS46, no trailing dots are allowed when ToASCII is called with verifyDNSLength = true. This negates the need for an additional l.verifyDNSLength flag in the previous commit. See https://www.unicode.org/L2/L2021/21170-utc169-properties-recs.pdf under section F2 Fixes golang/go#47182
This PR (HEAD: 8e763eb) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/text/+/504255 to see it. Tip: You can toggle comments from me using the |
Message from Wu Tingfeng: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/504255. |
Issue
The existing implementation of *Profile.process erroneously accepts trailing dots when verifyDNSLength is true.
This behavior is described in the Unicode Technical Standard 46 at https://unicode.org/reports/tr46/#ToASCII
Proposed change
*Profile.process to reject trailing dots when verifyDNSLength is true.
Fixes golang/go#47182