From 186aa9d9d7e5581f7cb8059e27bfd6400688104a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 28 May 1997 03:39:53 +0000 Subject: Handle RFC822 group names. svn path=/trunk/; revision=1032 --- NEWS | 1 + rfc822.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a43e32e7..a8a3f290 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ every user entry in a multi-user poll declaration. pl 3.9.6 (): * Fix the libc6 configuration stuff (thanks to Jesse Thilo). * Support for Kerberos-v4-authenticated IMAP. +* Don't choke on RFC822 group names. pl 3.9.5 (Sun May 18 01:05:13 EDT 1997): * Add an error notification when an incoming message has embedded NULs. diff --git a/rfc822.c b/rfc822.c index 267c06e5..c9dc37b9 100644 --- a/rfc822.c +++ b/rfc822.c @@ -70,7 +70,12 @@ const char *host; /* server hostname */ has_host_part = TRUE; else if (*from == '"') state = 2; - else if ((*from == ',' || HEADER_END(from)) && has_bare_name_part && !has_host_part) + /* + * Not expanding on from[-1] == ';' deals with groupnames, + * an obscure misfeature described in sections + * 6.1, 6.2.6, and A.1.5 of the RFC822 standard. + */ + else if ((*from == ',' || HEADER_END(from)) && has_bare_name_part && !has_host_part && from[-1] != ';') { int hostlen; -- cgit v1.2.3