[go] net/mail: enhance address parser to include IPv6 address tags

27 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Sep 13, 2024, 9:45:42 PM9/13/24
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gopher Robot added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Gopher Robot . unresolved

I spotted some possible problems.

These findings are based on simple heuristics. If a finding appears wrong, briefly reply here saying so. Otherwise, please address any problems and update the GitHub PR. When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above.

Possible problems detected:
1. Are you using markdown? Markdown should not be used to augment text in the commit message.

The commit title and commit message body come from the GitHub PR title and description, and must be edited in the GitHub web interface (not via git). For instructions, see [here](https://go.dev/wiki/GerritBot/#how-does-gerritbot-determine-the-final-commit-message). For guidelines on commit messages for the Go project, see [here](https://go.dev/doc/contribute#commit_messages).


(In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
Gerrit-Change-Number: 613335
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Comment-Date: Sat, 14 Sep 2024 01:45:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Gerrit Bot (Gerrit)

unread,
Sep 13, 2024, 9:45:43 PM9/13/24
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot has uploaded the change for review

Commit message

net/mail: enhance address parser to include IPv6 address tags

The new domain-literal support missed that IPv6 addresses need to be
prefixed with `IPv6:`.

The IPv6-address-literal Specification, defined in RFC 5321 Section 4.1.3,
outlines the format for IPv6 address literals:
https://datatracker.ietf.org/doc/html/rfc5321#section-4.1.3

Good news, the IANA has registered no other Address Literal Tags.

Updates #60206
Change-Id: I7796b0f78e386a6509e793a9db98404934797722
GitHub-Last-Rev: 18675e7046a2e2647c3aff056bc31876c19cab9b
GitHub-Pull-Request: golang/go#69461

Change diff

diff --git a/src/net/mail/message.go b/src/net/mail/message.go
index 21b075e..3c5adbf 100644
--- a/src/net/mail/message.go
+++ b/src/net/mail/message.go
@@ -751,8 +751,13 @@
return "", errors.New("mail: unclosed domain-literal")
}

- // Check if the domain literal is an IP address
- if net.ParseIP(dtext) == nil {
+ if addr, ok := strings.CutPrefix(dtext, "IPv6:"); ok {
+ if len(net.ParseIP(addr)) != net.IPv6len {
+ return "", fmt.Errorf("mail: invalid IPv6 address in domain-literal: %q", dtext)
+ }
+
+ } else if len(net.ParseIP(dtext).To4()) != net.IPv4len {
+ // Check if the domain literal is an IP address
return "", fmt.Errorf("mail: invalid IP address in domain-literal: %q", dtext)
}

diff --git a/src/net/mail/message_test.go b/src/net/mail/message_test.go
index dad9c36..0ea8cea 100644
--- a/src/net/mail/message_test.go
+++ b/src/net/mail/message_test.go
@@ -395,6 +395,7 @@
22: {"<jdoe@[[192.168.0.1]>", "bad character in domain-literal"},
23: {"<jdoe@[192.168.0.1>", "unclosed domain-literal"},
24: {"<jdoe@[256.0.0.1]>", "invalid IP address in domain-literal"},
+ 25: {"<jdoe@[fd42::de:ad:be:ef]>", "invalid IP address in domain-literal"},
}

for i, tc := range mustErrTestCases {
@@ -825,6 +826,20 @@
Address: "jdoe@[192.168.0.1]",
}},
},
+ // IPv6 Domain-literal
+ {
+ `jdoe@[IPv6:fd42::dead:beef:1234]`,
+ []*Address{{
+ Address: "jdoe@[IPv6:fd42::dead:beef:1234]",
+ }},
+ },
+ {
+ `John Doe <jdoe@[IPv6:fd42::dead:beef:1234]>`,
+ []*Address{{
+ Name: "John Doe",
+ Address: "jdoe@[IPv6:fd42::dead:beef:1234]",
+ }},
+ },
}
for _, test := range tests {
if len(test.exp) == 1 {
@@ -989,6 +1004,20 @@
Address: "jdoe@[192.168.0.1]",
}},
},
+ // IPv6 Domain-literal
+ {
+ `jdoe@[IPv6:fd42::dead:beef:1234]`,
+ []*Address{{
+ Address: "jdoe@[IPv6:fd42::dead:beef:1234]",
+ }},
+ },
+ {
+ `John Doe <jdoe@[IPv6:fd42::dead:beef:1234]>`,
+ []*Address{{
+ Name: "John Doe",
+ Address: "jdoe@[IPv6:fd42::dead:beef:1234]",
+ }},
+ },
}

ap := AddressParser{WordDecoder: &mime.WordDecoder{
@@ -1104,6 +1133,15 @@
&Address{Name: "Bob", Address: "bob@[192.168.0.1]"},
`"Bob" <bob@[192.168.0.1]>`,
},
+ // IPv6 Domain-literal
+ {
+ &Address{Address: "bob@[IPv6:fd42::dead:beef:1234]"},
+ "<bob@[IPv6:fd42::dead:beef:1234]>",
+ },
+ {
+ &Address{Name: "Bob", Address: "bob@[IPv6:fd42::dead:beef:1234]"},
+ `"Bob" <bob@[IPv6:fd42::dead:beef:1234]>`,
+ },
}
for _, test := range tests {
s := test.addr.String()

Change information

Files:
  • M src/net/mail/message.go
  • M src/net/mail/message_test.go
Change size: S
Delta: 2 files changed, 45 insertions(+), 2 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newchange
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Gopher Robot (Gerrit)

    unread,
    Sep 13, 2024, 9:46:55 PM9/13/24
    to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Message from Gopher Robot

    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.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
      Gerrit-Change-Number: 613335
      Gerrit-PatchSet: 1
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-Comment-Date: Sat, 14 Sep 2024 01:46:49 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Gerrit Bot (Gerrit)

      unread,
      Sep 13, 2024, 9:59:07 PM9/13/24
      to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
      Attention needed from Brad Fitzpatrick

      Gerrit Bot uploaded new patchset

      Gerrit Bot uploaded patch set #2 to this change.
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Brad Fitzpatrick
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
      Gerrit-Change-Number: 613335
      Gerrit-PatchSet: 2
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
      unsatisfied_requirement
      open
      diffy

      Cassondra Foesch (Gerrit)

      unread,
      Sep 14, 2024, 6:17:29 AM9/14/24
      to Gerrit Bot, goph...@pubsubhelper.golang.org, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Brad Fitzpatrick

      Cassondra Foesch added 1 comment

      Patchset-level comments
      File-level comment, Patchset 1:
      Gopher Robot . resolved

      I spotted some possible problems.

      These findings are based on simple heuristics. If a finding appears wrong, briefly reply here saying so. Otherwise, please address any problems and update the GitHub PR. When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above.

      Possible problems detected:
      1. Are you using markdown? Markdown should not be used to augment text in the commit message.

      The commit title and commit message body come from the GitHub PR title and description, and must be edited in the GitHub web interface (not via git). For instructions, see [here](https://go.dev/wiki/GerritBot/#how-does-gerritbot-determine-the-final-commit-message). For guidelines on commit messages for the Go project, see [here](https://go.dev/doc/contribute#commit_messages).


      (In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

      Cassondra Foesch

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Brad Fitzpatrick
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
        Gerrit-Change-Number: 613335
        Gerrit-PatchSet: 2
        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
        Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
        Gerrit-CC: Cassondra Foesch <cfo...@gmail.com>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
        Gerrit-Comment-Date: Sat, 14 Sep 2024 10:17:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Gopher Robot <go...@golang.org>
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Ian Lance Taylor (Gerrit)

        unread,
        Sep 16, 2024, 6:00:04 PM9/16/24
        to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Cassondra Foesch, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Brad Fitzpatrick

        Ian Lance Taylor added 2 comments

        File src/net/mail/message.go
        Line 759, Patchset 2 (Latest): } else if len(net.ParseIP(dtext).To4()) != net.IPv4len {
        Ian Lance Taylor . unresolved

        } else if net.ParseIP(dtext).To4() == nil {

        Line 760, Patchset 2 (Latest): // Check if the domain literal is an IP address
        Ian Lance Taylor . unresolved

        This comment seems misplaced now.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Brad Fitzpatrick
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
          Gerrit-Change-Number: 613335
          Gerrit-PatchSet: 2
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-CC: Cassondra Foesch <cfo...@gmail.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-Comment-Date: Mon, 16 Sep 2024 21:59:57 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          unsatisfied_requirement
          open
          diffy

          Gerrit Bot (Gerrit)

          unread,
          Sep 17, 2024, 8:26:35 AM9/17/24
          to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Brad Fitzpatrick

          Gerrit Bot uploaded new patchset

          Gerrit Bot uploaded patch set #3 to this change.
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brad Fitzpatrick
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: newpatchset
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
          Gerrit-Change-Number: 613335
          Gerrit-PatchSet: 3
          unsatisfied_requirement
          open
          diffy

          Cassy Foesch (Gerrit)

          unread,
          Sep 17, 2024, 8:31:25 AM9/17/24
          to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Cassondra Foesch, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Brad Fitzpatrick and Ian Lance Taylor

          Cassy Foesch added 2 comments

          File src/net/mail/message.go
          Line 759, Patchset 2: } else if len(net.ParseIP(dtext).To4()) != net.IPv4len {
          Ian Lance Taylor . resolved

          } else if net.ParseIP(dtext).To4() == nil {

          Cassy Foesch

          Done

          Line 760, Patchset 2: // Check if the domain literal is an IP address
          Ian Lance Taylor . unresolved

          This comment seems misplaced now.

          Cassy Foesch

          Yeah, the comment was ahead of the "if" before, but when it changed to an "else if", putting it above the line feels even more wrong, as it is in the wrong code block.

          With a little bit of Repeat Yourself, we could copy the "return" below, and then get a plain "if" again, which allows the comment to return to ahead of the "if".

          Or, I could rework the comment to suggest that the condition is true in this block, like "do not accept any non IPv4 addresses" or such.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brad Fitzpatrick
          • Ian Lance Taylor
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
          Gerrit-Change-Number: 613335
          Gerrit-PatchSet: 3
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-CC: Cassondra Foesch <cfo...@gmail.com>
          Gerrit-CC: Cassy Foesch <puell...@googlemail.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Comment-Date: Tue, 17 Sep 2024 12:31:16 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
          unsatisfied_requirement
          open
          diffy

          Ian Lance Taylor (Gerrit)

          unread,
          Sep 18, 2024, 12:07:42 AM9/18/24
          to Gerrit Bot, goph...@pubsubhelper.golang.org, Cassy Foesch, Ian Lance Taylor, Cassondra Foesch, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Brad Fitzpatrick and Cassy Foesch

          Ian Lance Taylor added 1 comment

          File src/net/mail/message.go
          Line 760, Patchset 2: // Check if the domain literal is an IP address
          Ian Lance Taylor . unresolved

          This comment seems misplaced now.

          Cassy Foesch

          Yeah, the comment was ahead of the "if" before, but when it changed to an "else if", putting it above the line feels even more wrong, as it is in the wrong code block.

          With a little bit of Repeat Yourself, we could copy the "return" below, and then get a plain "if" again, which allows the comment to return to ahead of the "if".

          Or, I could rework the comment to suggest that the condition is true in this block, like "do not accept any non IPv4 addresses" or such.

          Ian Lance Taylor

          It seems OK to me to put the comment before the strings.CutPrefix call. It is correctly saying that we are checking if the domain literal is an IP address (an IPv4 or an IPv6 address). Or rewriting the comment is fine if that seems better.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brad Fitzpatrick
          • Cassy Foesch
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
          Gerrit-Change-Number: 613335
          Gerrit-PatchSet: 3
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-CC: Cassondra Foesch <cfo...@gmail.com>
          Gerrit-CC: Cassy Foesch <puell...@googlemail.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-Attention: Cassy Foesch <puell...@googlemail.com>
          Gerrit-Comment-Date: Wed, 18 Sep 2024 04:07:36 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
          Comment-In-Reply-To: Cassy Foesch <puell...@googlemail.com>
          unsatisfied_requirement
          open
          diffy

          Gerrit Bot (Gerrit)

          unread,
          Sep 18, 2024, 3:45:52 AM9/18/24
          to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Brad Fitzpatrick and Cassy Foesch

          Gerrit Bot uploaded new patchset

          Gerrit Bot uploaded patch set #4 to this change.
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brad Fitzpatrick
          • Cassy Foesch
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: newpatchset
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
          Gerrit-Change-Number: 613335
          Gerrit-PatchSet: 4
          unsatisfied_requirement
          open
          diffy

          Cassy Foesch (Gerrit)

          unread,
          Sep 18, 2024, 4:16:40 AM9/18/24
          to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Cassondra Foesch, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Brad Fitzpatrick and Ian Lance Taylor

          Cassy Foesch added 1 comment

          File src/net/mail/message.go
          Line 760, Patchset 2: // Check if the domain literal is an IP address
          Ian Lance Taylor . resolved

          This comment seems misplaced now.

          Cassy Foesch

          Yeah, the comment was ahead of the "if" before, but when it changed to an "else if", putting it above the line feels even more wrong, as it is in the wrong code block.

          With a little bit of Repeat Yourself, we could copy the "return" below, and then get a plain "if" again, which allows the comment to return to ahead of the "if".

          Or, I could rework the comment to suggest that the condition is true in this block, like "do not accept any non IPv4 addresses" or such.

          Ian Lance Taylor

          It seems OK to me to put the comment before the strings.CutPrefix call. It is correctly saying that we are checking if the domain literal is an IP address (an IPv4 or an IPv6 address). Or rewriting the comment is fine if that seems better.

          Cassy Foesch

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brad Fitzpatrick
          • Ian Lance Taylor
          Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 4
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-CC: Cassondra Foesch <cfo...@gmail.com>
            Gerrit-CC: Cassy Foesch <puell...@googlemail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Comment-Date: Wed, 18 Sep 2024 08:16:32 +0000
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Ian Lance Taylor (Gerrit)

            unread,
            Sep 18, 2024, 12:46:34 PM9/18/24
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick

            Ian Lance Taylor voted Commit-Queue+1

            Commit-Queue+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 4
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Comment-Date: Wed, 18 Sep 2024 16:46:26 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Cassy Foesch (Gerrit)

            unread,
            Sep 19, 2024, 1:36:34 PM9/19/24
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick and Ian Lance Taylor

            Cassy Foesch added 1 comment

            Patchset-level comments
            File-level comment, Patchset 4 (Latest):
            Cassy Foesch . resolved

            😐oof. I’ve fixed the wrong-sense on the To4 conditional.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            • Ian Lance Taylor
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 4
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-CC: Cassy Foesch <puell...@googlemail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Comment-Date: Thu, 19 Sep 2024 17:36:28 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Gerrit Bot (Gerrit)

            unread,
            Sep 19, 2024, 1:38:16 PM9/19/24
            to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick and Ian Lance Taylor

            Gerrit Bot uploaded new patchset

            Gerrit Bot uploaded patch set #5 to this change.
            Following approvals got outdated and were removed:
            • TryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            • Ian Lance Taylor
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: newpatchset
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 5
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Cassondra Foesch (Gerrit)

            unread,
            Oct 31, 2024, 9:03:15 PM10/31/24
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick and Ian Lance Taylor

            Cassondra Foesch added 1 comment

            Patchset-level comments
            File-level comment, Patchset 5 (Latest):
            Cassondra Foesch . resolved

            Friendly ping.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            • Ian Lance Taylor
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 5
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Comment-Date: Fri, 01 Nov 2024 01:03:07 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Sean Liao (Gerrit)

            unread,
            Dec 12, 2025, 3:10:07 PM12/12/25
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Cassondra Foesch, Go LUCI, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick and Ian Lance Taylor

            Sean Liao voted Commit-Queue+1

            Commit-Queue+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            • Ian Lance Taylor
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 6
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Reviewer: Sean Liao <se...@liao.dev>
            Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Comment-Date: Fri, 12 Dec 2025 20:09:57 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Sean Liao (Gerrit)

            unread,
            Dec 14, 2025, 3:36:02 PM12/14/25
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Cassondra Foesch, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick and Ian Lance Taylor

            Sean Liao voted and added 1 comment

            Votes added by Sean Liao

            Code-Review+2

            1 comment

            Patchset-level comments
            File-level comment, Patchset 6 (Latest):
            Sean Liao . resolved

            Note that since Go1.23, net/mail has wrongly accepted [ipv6] without the IPv6: prefix.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            • Ian Lance Taylor
            Submit Requirements:
            • requirement satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedNo-Wait-Release
            • requirement is not satisfiedReview-Enforcement
            • requirement satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 6
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Reviewer: Sean Liao <se...@liao.dev>
            Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Comment-Date: Sun, 14 Dec 2025 20:35:54 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Sean Liao (Gerrit)

            unread,
            Dec 15, 2025, 10:33:16 AM12/15/25
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Cassondra Foesch, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick and Ian Lance Taylor

            Sean Liao added 1 comment

            Commit Message
            Line 7, Patchset 6 (Latest):net/mail: enhance address parser to include IPv6 address tags
            Sean Liao . unresolved

            ```suggestion
            net/mail: parse ipv6 in addresses according to RFC 5321
            ```

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            • Ian Lance Taylor
            Submit Requirements:
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedNo-Wait-Release
            • requirement is not satisfiedReview-Enforcement
            • requirement satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
            Gerrit-Change-Number: 613335
            Gerrit-PatchSet: 6
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Reviewer: Sean Liao <se...@liao.dev>
            Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Comment-Date: Mon, 15 Dec 2025 15:33:08 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Cassondra Foesch (Gerrit)

            unread,
            Dec 15, 2025, 4:06:09 PM12/15/25
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick and Ian Lance Taylor

            Cassondra Foesch added 1 comment

            Commit Message
            Line 7, Patchset 6 (Latest):net/mail: enhance address parser to include IPv6 address tags
            Sean Liao . unresolved

            ```suggestion
            net/mail: parse ipv6 in addresses according to RFC 5321
            ```

            Cassondra Foesch

            I seem to have trouble making this change. Here, gerrit does not recognize that @googlemail.com is also @gmail.com, and while I have changed the title of the Github title (as I read I should do on the howto), it does not seem to have changed here. 😐

            Gerrit-Comment-Date: Mon, 15 Dec 2025 21:06:01 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Sean Liao <se...@liao.dev>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Gerrit Bot (Gerrit)

            unread,
            May 4, 2026, 10:19:05 AMMay 4
            to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
            Attention needed from Brad Fitzpatrick, Ian Lance Taylor and Sean Liao

            Gerrit Bot uploaded new patchset

            Gerrit Bot uploaded patch set #7 to this change.
            Following approvals got outdated and were removed:
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Brad Fitzpatrick
            • Ian Lance Taylor
            • Sean Liao
            Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: newpatchset
              Gerrit-Project: go
              Gerrit-Branch: master
              Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
              Gerrit-Change-Number: 613335
              Gerrit-PatchSet: 7
              Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
              Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Reviewer: Sean Liao <se...@liao.dev>
              Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
              Gerrit-CC: Gopher Robot <go...@golang.org>
              Gerrit-Attention: Sean Liao <se...@liao.dev>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Cassondra Foesch (Gerrit)

              unread,
              May 4, 2026, 10:22:23 AMMay 4
              to Gerrit Bot, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
              Attention needed from Brad Fitzpatrick, Ian Lance Taylor and Sean Liao

              Cassondra Foesch added 2 comments

              Patchset-level comments
              File-level comment, Patchset 7 (Latest):
              Cassondra Foesch . resolved

              A rebase on fresh branch finally updated title.

              Commit Message
              Line 7, Patchset 6:net/mail: enhance address parser to include IPv6 address tags
              Sean Liao . resolved

              ```suggestion
              net/mail: parse ipv6 in addresses according to RFC 5321
              ```

              Cassondra Foesch

              I seem to have trouble making this change. Here, gerrit does not recognize that @googlemail.com is also @gmail.com, and while I have changed the title of the Github title (as I read I should do on the howto), it does not seem to have changed here. 😐

              Cassondra Foesch

              Done

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Brad Fitzpatrick
              • Ian Lance Taylor
              • Sean Liao
              Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: go
              Gerrit-Branch: master
              Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
              Gerrit-Change-Number: 613335
              Gerrit-PatchSet: 7
              Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
              Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Reviewer: Sean Liao <se...@liao.dev>
              Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
              Gerrit-CC: Gopher Robot <go...@golang.org>
              Gerrit-Attention: Sean Liao <se...@liao.dev>
              Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-Comment-Date: Mon, 04 May 2026 14:22:16 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Cassondra Foesch <puell...@googlemail.com>
              Comment-In-Reply-To: Sean Liao <se...@liao.dev>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Sean Liao (Gerrit)

              unread,
              May 25, 2026, 6:52:56 AM (13 days ago) May 25
              to Gerrit Bot, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Cassondra Foesch, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
              Attention needed from Brad Fitzpatrick and Ian Lance Taylor

              Sean Liao voted

              Code-Review+2
              Commit-Queue+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Brad Fitzpatrick
              • Ian Lance Taylor
              Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: go
              Gerrit-Branch: master
              Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
              Gerrit-Change-Number: 613335
              Gerrit-PatchSet: 7
              Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
              Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Reviewer: Sean Liao <se...@liao.dev>
              Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
              Gerrit-CC: Gopher Robot <go...@golang.org>
              Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-Comment-Date: Mon, 25 May 2026 10:52:48 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              David Chase (Gerrit)

              unread,
              May 27, 2026, 10:08:40 AM (11 days ago) May 27
              to Gerrit Bot, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Cassondra Foesch, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
              Attention needed from Brad Fitzpatrick and Ian Lance Taylor

              David Chase voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Brad Fitzpatrick
              • Ian Lance Taylor
              Submit Requirements:
                • requirement satisfiedCode-Review
                • requirement satisfiedNo-Unresolved-Comments
                • requirement is not satisfiedReview-Enforcement
                • requirement satisfiedTryBots-Pass
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
                Gerrit-Change-Number: 613335
                Gerrit-PatchSet: 7
                Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
                Gerrit-Reviewer: David Chase <drc...@google.com>
                Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Reviewer: Sean Liao <se...@liao.dev>
                Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
                Gerrit-CC: Gopher Robot <go...@golang.org>
                Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
                Gerrit-Comment-Date: Wed, 27 May 2026 14:08:36 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Junyang Shao (Gerrit)

                unread,
                May 27, 2026, 12:37:03 PM (11 days ago) May 27
                to Gerrit Bot, goph...@pubsubhelper.golang.org, David Chase, golang...@luci-project-accounts.iam.gserviceaccount.com, Cassondra Foesch, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com
                Attention needed from Brad Fitzpatrick and Ian Lance Taylor

                Junyang Shao voted Code-Review+1

                Code-Review+1
                Open in Gerrit

                Related details

                Attention is currently required from:
                • Brad Fitzpatrick
                • Ian Lance Taylor
                Submit Requirements:
                  • requirement satisfiedCode-Review
                  • requirement satisfiedNo-Unresolved-Comments
                  • requirement satisfiedReview-Enforcement
                  • requirement satisfiedTryBots-Pass
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: comment
                  Gerrit-Project: go
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
                  Gerrit-Change-Number: 613335
                  Gerrit-PatchSet: 7
                  Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                  Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
                  Gerrit-Reviewer: David Chase <drc...@google.com>
                  Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                  Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
                  Gerrit-Reviewer: Sean Liao <se...@liao.dev>
                  Gerrit-CC: Cassondra Foesch <puell...@googlemail.com>
                  Gerrit-CC: Gopher Robot <go...@golang.org>
                  Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                  Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
                  Gerrit-Comment-Date: Wed, 27 May 2026 16:36:58 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Sean Liao (Gerrit)

                  unread,
                  Jun 6, 2026, 8:54:42 AM (17 hours ago) Jun 6
                  to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, David Chase, golang...@luci-project-accounts.iam.gserviceaccount.com, Cassondra Foesch, Ian Lance Taylor, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com

                  Sean Liao submitted the change

                  Change information

                  Commit message:
                  net/mail: parse ipv6 in addresses according to RFC 5321.


                  The new domain-literal support missed that IPv6 addresses need to be
                  prefixed with "IPv6:".

                  The IPv6-address-literal Specification, defined in RFC 5321 Section 4.1.3,
                  outlines the format for IPv6 address literals:
                  https://datatracker.ietf.org/doc/html/rfc5321#section-4.1.3

                  Good news, the IANA has registered no other Address Literal Tags.

                  Updates #60206
                  Change-Id: I7796b0f78e386a6509e793a9db98404934797722
                  GitHub-Last-Rev: b65fdec3e96da76f16b42eb761d6aafd3b476377
                  GitHub-Pull-Request: golang/go#69461
                  Reviewed-by: Sean Liao <se...@liao.dev>
                  Reviewed-by: Junyang Shao <shaoj...@google.com>
                  Reviewed-by: David Chase <drc...@google.com>
                  Files:
                  • M src/net/mail/message.go
                  • M src/net/mail/message_test.go
                  Change size: S
                  Delta: 2 files changed, 44 insertions(+), 1 deletion(-)
                  Branch: refs/heads/master
                  Submit Requirements:
                  Open in Gerrit
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: merged
                  Gerrit-Project: go
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I7796b0f78e386a6509e793a9db98404934797722
                  Gerrit-Change-Number: 613335
                  Gerrit-PatchSet: 8
                  open
                  diffy
                  satisfied_requirement
                  Reply all
                  Reply to author
                  Forward
                  0 new messages