Skip to content
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

net/mail: change in behavior of ParseAddressList("") in 1.15 #40803

Closed
ianlancetaylor opened this issue Aug 14, 2020 · 4 comments
Closed

net/mail: change in behavior of ParseAddressList("") in 1.15 #40803

ianlancetaylor opened this issue Aug 14, 2020 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

In releases of Go before 1.15, mail.ParseAddressList("") returned nil and an error mail: no address. In Go 1.15 it returns nil and a nil error. This change was due to the fix for #36959, which is not about an empty string. There's no reason to change the behavior here. We should fix this on tip and backport the fix to 1.15 for 1.15.1.

Thanks to @gofish for reporting this. CC @timmydo.

@ianlancetaylor ianlancetaylor added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Aug 14, 2020
@ianlancetaylor ianlancetaylor added this to the Go1.16 milestone Aug 14, 2020
@ianlancetaylor
Copy link
Contributor Author

@gopherbot Please open backport to 1.15.

This is a minor but unintended change in behavior in 1.15. We should restore the behavior seen in all earlier Go releases.

@gopherbot
Copy link

Backport issue(s) opened: #40804 (for 1.15).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot
Copy link

Change https://golang.org/cl/248598 mentions this issue: net/mail: return error on empty address list

@gopherbot
Copy link

Change https://golang.org/cl/251167 mentions this issue: [release-branch.go1.15] net/mail: return error on empty address list

gopherbot pushed a commit that referenced this issue Aug 28, 2020
This restores the handling accidentally changed in CL 217377.

Fixes #40804
For #40803
For #36959

Change-Id: If77fbc0c2a1dde4799f760affdfb8dde9bcaf458
Reviewed-on: https://go-review.googlesource.com/c/go/+/248598
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Jeremy Fishman <jfishman@cloudflare.com>
(cherry picked from commit 3e636ab)
Reviewed-on: https://go-review.googlesource.com/c/go/+/251167
tgulacsi pushed a commit to tgulacsi/aerc that referenced this issue Sep 15, 2020
Go pre 1.15 parsed an empty string as an error, 1.15 did not but this was
unintentional as per golang/go#40803

Fix the comment accordingly
@golang golang locked and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants