]> diplodocus.org Git - minc/commit
(get_headers): Don't allow input from the message to break the
authorepg <>
Tue, 10 Sep 2002 10:05:15 +0000 (10:05 +0000)
committerepg <>
Tue, 10 Sep 2002 10:05:15 +0000 (10:05 +0000)
commit5e73c433e4a41e0ae6ae0ed1ace34e1efb90841a
treea0ffa9677027e86f1f4e34de68afde8df7761ea9
parent90b7046b27dc51e4fc7c0b9a58c2059a76e5a73c
(get_headers): Don't allow input from the message to break the
regex used to split headers.

Today i encountered a message with the following ilnes:

X-scanner: scanned by Inflex 1.0.12.3 -
(http: //www.gsm.com.my)

What we have is a broken pile of shit from gsm.com (unsurprisingly,
as i visit the URL they provide, i see that one of their frame
components spits out an HTML page with Content-Type: text/plain)
that doesn't know how to fold headers.  At some point, some "helpful"
mail software (perhaps even my very own postfix installation; who
knows?) mangled what appeared to it to be an '(http' header; it
added a space after the colon.

Whether the mangling had happened or not, i'm sure minc would have
been confused.  Doug Porter provided the fix (using perl's \Q and
\E in the split() regex to disable pattern meta-chars in $fieldname).
minc