Mailing List Archive

[Bug 385] Cannot add Content-Transfer-Encoding header with extra_headers statement
http://www.exim.org/bugzilla/show_bug.cgi?id=385





------- Additional Comments From holmgren@lysator.liu.se 2006-08-20 23:02 -------
Fascinating. I can reproduce it, but there's no clue in the code as to why it
would happen. The code doesn't handle hyphens specially; it just checks that if
a line doesn't begin with whitespace, there's at least one character and no
whitespace before the colon. It's around lines 2060 through 2200 in filter.c.
And the string is written to the log exactly as that piece of code sees it,
except that non-printing characters are escaped.

Changing "Content-Transfer-Encoding" to "Content-Transfer-Encodin" also works,
but just deleting the Content-Type field doesn't. WTF?



------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 385] Cannot add Content-Transfer-Encoding header with extra_headers statement [ In reply to ]
http://www.exim.org/bugzilla/show_bug.cgi?id=385





------- Additional Comments From holmgren@lysator.liu.se 2006-08-20 23:13 -------
Oh, and *adding* a character also makes it go through, but not changing one or
more. So apparently it only fails with field names with exactly 25 characters.



------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: [Bug 385] Cannot add Content-Transfer-Encoding header with extra_headers statement [ In reply to ]
On Sun, 20 Aug 2006, bugzilla-daemon@sesame.csx.cam.ac.uk wrote:

> Oh, and *adding* a character also makes it go through, but not changing one or
> more. So apparently it only fails with field names with exactly 25 characters.

Actually, any second or subsequent header with an odd number of characters
in the header name triggers the bug. The fix is:

--- filter.c 7 Jul 2006 14:36:04 -0000 1.11
+++ filter.c 21 Aug 2006 11:25:25 -0000
@@ -2186,7 +2186,6 @@
string_printing(s), command_list[commands->command]);
return FF_ERROR;
}
- pp++;
}
p = pp;
}


Tony.
--
<fanf@exim.org> <dot@dotat.at> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 385] Cannot add Content-Transfer-Encoding header with extra_headers statement [ In reply to ]
http://www.exim.org/bugzilla/show_bug.cgi?id=385


dot@dotat.at changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED






------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: [Bug 385] Cannot add Content-Transfer-Encoding header with extra_headers statement [ In reply to ]
On Mon, Aug 21, 2006 at 12:26:54PM +0100, Tony Finch wrote:
> On Sun, 20 Aug 2006, bugzilla-daemon@sesame.csx.cam.ac.uk wrote:
> > Oh, and *adding* a character also makes it go through, but not changing one or
> > more. So apparently it only fails with field names with exactly 25 characters.
>
> Actually, any second or subsequent header with an odd number of characters
> in the header name triggers the bug. The fix is:
>
> --- filter.c 7 Jul 2006 14:36:04 -0000 1.11
> +++ filter.c 21 Aug 2006 11:25:25 -0000
> @@ -2186,7 +2186,6 @@
> string_printing(s), command_list[commands->command]);
> return FF_ERROR;
> }
> - pp++;
> }
> p = pp;
> }
>

I have added the fix to exim4 4.63-3 in Debian[1] and can confirm it
working. Thanks for the swift help.

Greetings
Marc

[1] there must be _one_ advantage in being able to upload to the
distribution, saving me from rolling a locally patched version *g*

--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##