Bug in mail->news gateway in 2.0.5 (and *simple* fix)

Bug: in Mailman/Handlers/ToUsenet.py, there are spaces inserted after colons where they are missing ("NNTP is strict about spaces after the colon in headers").
If a colon appears in a continuation line, it is treated as a header colon.
Fix: skip lines that start with whitespace.
For those interested, the history of the finding of the bug:
Problem: my signed emails appeared on Usenet garbled. The multipart boundary had an extra space inserted (which of course the actual boundaries hadn't).
After some exchange with Martin Armstrong (who made me aware of this) we concluded it had to be the mail->news gateway (as my direct mail to him, also signed, wasn't garbled).
I then investigated ToUsenet.py, and found the error.
Why this hasn't hit a lot more often is simple: most MUA seem to use some random gibberish as the boundary string. SEMI doesn't...
Of course, if this is fixed in 2.1, you can ignore this (assuming that it comes out soonish ;-)
Bye, J
-- Jürgen A. Erhard (juergen.erhard@gmx.net, jae@users.sourceforge.net) MARS: http://members.tripod.com/Juergen_Erhard/mars_index.html Life's Better Without Braces (http://www.python.org) I wish I had more energy -- or less ambition.

Many months ago...
"jae" == Jürgen A Erhard <juergen.erhard@gmx.net> writes:
jae> Bug: in Mailman/Handlers/ToUsenet.py, there are spaces
jae> inserted after colons where they are missing ("NNTP is strict
jae> about spaces after the colon in headers").
jae> If a colon appears in a continuation line, it is treated as a
jae> header colon.
jae> Fix: skip lines that start with whitespace.
This fix should now be on-line.

"BAW" == Barry A Warsaw <barry@zope.com> writes:
BAW> Many months ago...
"jae" == Jürgen A Erhard <juergen.erhard@gmx.net> writes:
jae> Bug: in Mailman/Handlers/ToUsenet.py, there are spaces
jae> inserted after colons where they are missing ("NNTP is strict
jae> about spaces after the colon in headers").
jae> If a colon appears in a continuation line, it is treated as a
jae> header colon.
jae> Fix: skip lines that start with whitespace.
BAW> This fix should now be on-line.
I should add that MM2.1 won't be affected because it uses the email.Message.Message class which already Does The Right Thing.
-Barry

Many months ago...
"jae" == Jürgen A Erhard <juergen.erhard@gmx.net> writes:
jae> Bug: in Mailman/Handlers/ToUsenet.py, there are spaces
jae> inserted after colons where they are missing ("NNTP is strict
jae> about spaces after the colon in headers").
jae> If a colon appears in a continuation line, it is treated as a
jae> header colon.
jae> Fix: skip lines that start with whitespace.
This fix should now be on-line.

"BAW" == Barry A Warsaw <barry@zope.com> writes:
BAW> Many months ago...
"jae" == Jürgen A Erhard <juergen.erhard@gmx.net> writes:
jae> Bug: in Mailman/Handlers/ToUsenet.py, there are spaces
jae> inserted after colons where they are missing ("NNTP is strict
jae> about spaces after the colon in headers").
jae> If a colon appears in a continuation line, it is treated as a
jae> header colon.
jae> Fix: skip lines that start with whitespace.
BAW> This fix should now be on-line.
I should add that MM2.1 won't be affected because it uses the email.Message.Message class which already Does The Right Thing.
-Barry
participants (2)
-
"Jürgen A. Erhard"
-
barry@zope.com