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

Comments

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Aug 14, 2020

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
Copy link
Contributor Author

@ianlancetaylor ianlancetaylor commented Aug 14, 2020

@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

@gopherbot gopherbot commented Aug 14, 2020

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

@gopherbot gopherbot commented Aug 14, 2020

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

@gopherbot gopherbot closed this in 3e636ab Aug 27, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 27, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.