Re: br-msk-stats-update

From: Murray S. Kucherawy <msk_at_blackops.org>
Date: Sun, 29 Aug 2010 13:27:07 -0700 (PDT)

On Sun, 29 Aug 2010, Alessandro Vesely wrote:
>>> I'm not familiar with how headers are delivered to the milter's
>>> mlfi_header function, so this question may be silly: shouldn't there
>>> be some code in opendkim/stats.c to guard against \t, \n, and
>>> perhaps spaces possibly occurring in hdr_val?
>>
>> Why? We do want those because "simple" canonicalization needs to see
>> how the header field's contents were wrapped and what spaces were
>> where in order to produce the header hash correctly.
>>
>> mlfi_header() passes the header field's name and contents, including
>> all spaces, CRs and LFs, minus the trailing CR and LF characters.
>
> That would disrupt the plain file in case you get, say
>
> Content-Type: text/plain<TAB>; charset: utf8
>
> If that <TAB> makes it to the plain stats file, strtok will choke on it, and
> give an invalid M line.

Ah, true. I've patched the code to fix this now. (Note that I don't
really feel the need to make this completely bulletproof like I would
canonicalization code or a MIME parser, but that was an easy fix to put
in.)

While I'm at it, I've changed the "syntax" generation code to report the
full error code and not just a Boolean. This allowed elimination of a few
columns in the new code's "signatures" table.

I wouldn't feel too much loss resetting the tables to get rid of the 15
errors previously logged once this stuff rolls to Beta next week.

-MSK
Received on Sun Aug 29 2010 - 20:27:26 PST

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sun Aug 29 2010 - 20:50:00 PST