wrong end of header pattern?

From: John Rosauer (
Date: Mán 12 Feb 2001 - 00:57:52 UTC


I encountered a problem created by a mail message having a header
where the Subject: field was over two lines but the second line
consisted only of white space. For example:

Subject: email subject over two lines with the 2nd anly white space
Date: ....

This caused the sanitiser to think the headers ended after the
Subject: causing obvious problems.

I thought the end of headers was indicated by an empty line,
rather than a white space filled line, so in I

< while (($line !~ /^\s*$/) && (length($rawheader) < 64000))

>       while (($line !~ /^$/) && (length($rawheader) < 64000))

and it fixed the problem.

Of course, the problem manifests if any header field has this property, not just Subject.

Please let me know if I have fixed it the wrong way.

best regards, john -- John Rosauer, Senior Systems Administrator email: RMB Australia Limited business: +61 2 9251 4177 Level 5, Underwood House, 37-49 Pitt Street fax: +61 2 9256 6246 Sydney, 2000, Australia cell: +61 414 580 723

-- This mailing list's home page is: There you can find subscription instructions and possibly an archive. is a free Icelandic mailing list service.

hosted by