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
Comments
@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. |
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. |
Change https://golang.org/cl/248598 mentions this issue: |
Change https://golang.org/cl/251167 mentions this issue: |
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
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
In releases of Go before 1.15,
mail.ParseAddressList("")
returnednil
and an errormail: no address
. In Go 1.15 it returnsnil
and anil
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.
The text was updated successfully, but these errors were encountered: