CR check in base64_decode

David Relson relson at osagesoftware.com
Tue Jan 4 03:03:24 CET 2005


On Tue, 04 Jan 2005 02:47:46 +0100
Matthias Andree wrote:

> David Relson <relson at osagesoftware.com> writes:
> 
> >> Hm. "file" of what format? mbox and Maildir store LF only, I don't know
> >> about the other formats offhand. At any rate, that stuff needs to be
> >> called from another layer anyways, not from the lexer.  A leftover
> >> change from last year.
> >
> > Remember bogofilter runs on multiple platforms, hence must deal with
> > CRLF pairs...
> 
> I wonder if that should be the algorithm's business. Traditionally, mail
> has been operating on lines, without regard to the endings. We save the
> line endings in the string, confusing the base64* - which needn't see
> the line ending at all.

lexer_v3.l calls text_decode() which calls base64_decode().  The EOL
sequence is included in the word_t that's passed along.  An interesting
experiment would be to have lexer_v3.l exclude the EOL.....
 



More information about the bogofilter-dev mailing list