]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.20] net/mail: permit more characters in mail headers
authorIan Lance Taylor <iant@golang.org>
Mon, 19 Jun 2023 22:35:50 +0000 (15:35 -0700)
committerIan Lance Taylor <iant@google.com>
Wed, 21 Jun 2023 22:17:05 +0000 (22:17 +0000)
commitb59efe6c341c3873ff9088990ec4513336c8685f
tree56ea2971b82aa53ba47988daedb27dbe3de75d0f
parentc32f1afb4147a7380d9c2efa8503434198190b3a
[release-branch.go1.20] net/mail: permit more characters in mail headers

We parse mail messages using net/textproto. For #53188, we tightened
up the bytes permitted by net/textproto to match RFC 7230.
However, this package uses RFC 5322 which is more permissive.
Restore the permisiveness we used to have, so that older code
continues to work.

For #58862
For #60332
Fixes #60874
Fixes #60875

Change-Id: I5437f5e18a756f6ca61c13c4d8ba727be73eff9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/504881
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/mail/message.go
src/net/mail/message_test.go