text icon indicating copy to clipboard operation
text copied to clipboard

x/text: *Profile.process to throw labelError if verifyDNSLength = true and s ends with trailing dot.

Open elliotwutingfeng opened this issue 2 years ago • 6 comments

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 https://github.com/golang/go/issues/47182

elliotwutingfeng avatar Jun 18 '23 14:06 elliotwutingfeng

This PR (HEAD: f99f2cfa11b94ccfb5017535e86fd5c5330e54dd) 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 comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Jun 18 '23 14:06 gopherbot

Message from Gopher Robot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps: A maintainer will review your change and provide feedback. See https://go.dev/doc/contribute#review for more info and tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be surprising to people new to the project. The careful, iterative review process is our way of helping mentor contributors and ensuring that their contributions have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which little code gets reviewed or merged. If a reviewer responds with a comment like R=go1.11 or adds a tag like "wait-release", it means that this CL will be reviewed as part of the next development cycle. See https://go.dev/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/504255. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Jun 18 '23 14:06 gopherbot

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. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Jun 21 '23 08:06 gopherbot

As per https://github.com/golang/go/issues/58778#issuecomment-1603110571:

The root label should be disallowed when VerifyDNSLength is true, so www.éxamplé.ćóḿ. should also be rejected but is currently not. So this problem does not only affect ASCII labels as believed in #47182.

zeroizerz avatar Jun 22 '23 19:06 zeroizerz

This PR (HEAD: 8e763eb0b9cb67fb391e6e62c4150815bd9d6562) 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 comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Jun 22 '23 21:06 gopherbot

Message from Wu Tingfeng:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/504255. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Jun 22 '23 22:06 gopherbot