diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-04-11 14:08:06 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-04-12 13:55:59 +0200 |
| commit | 7d014f2c405f05d9ca3471b794e90940d7b852c6 (patch) | |
| tree | ef07f7a821d3bd3f80a01799cf8ca8f2075f5024 /pkg/email/parser_test.go | |
| parent | 7e83566529c0c9fd1882625e157ad53383fe3168 (diff) | |
pkg/email: parse multiple In-Reply-To message IDs
Even though the standard seems to prohibit it, there are real world
cases of messages with multiple IDs in an "In-Reply-To" header.
Diffstat (limited to 'pkg/email/parser_test.go')
| -rw-r--r-- | pkg/email/parser_test.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pkg/email/parser_test.go b/pkg/email/parser_test.go index 151d259b8..81a532648 100644 --- a/pkg/email/parser_test.go +++ b/pkg/email/parser_test.go @@ -910,4 +910,32 @@ Reported-by: syzbot <foo+223c7461c58c58a4cb10@bar.com> `, Command: CmdNone, }}, + {`Sender: syzkaller-bugs@googlegroups.com +Subject: Some discussion +To: <someone@foo.com> +From: bar <bar@foo.com> +Message-ID: <1250334f-7220-2bff-5d87-b87573758d81@bar.com> +Date: Sun, 7 May 2017 19:54:00 -0700 +MIME-Version: 1.0 +Content-Type: text/plain; charset="UTF-8" +Content-Language: en-US +Content-Transfer-Encoding: quoted-printable +In-Reply-To: <000000000000f1a9d205f909f327@google.com> + <000000000000ee3a3005f909f30a@google.com> +Precedence: bulk +List-ID: <linux-kernel.vger.kernel.org> +X-Mailing-List: linux-kernel@vger.kernel.org + +Some text +`, Email{ + MessageID: "<1250334f-7220-2bff-5d87-b87573758d81@bar.com>", + // The first one should be picked up. + InReplyTo: "<000000000000f1a9d205f909f327@google.com>", + Date: time.Date(2017, time.May, 7, 19, 54, 0, 0, parseTestZone), + Subject: "Some discussion", + Author: "bar@foo.com", + Cc: []string{"bar@foo.com", "someone@foo.com"}, + Body: "Some text\n", + Command: CmdNone, + }}, } |
