From: epg <> Date: Tue, 10 Sep 2002 10:05:15 +0000 (+0000) Subject: (get_headers): Don't allow input from the message to break the X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/5e73c433e4a41e0ae6ae0ed1ace34e1efb90841a?ds=inline;hp=5e73c433e4a41e0ae6ae0ed1ace34e1efb90841a (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). ---