ietf-822
[Top] [All Lists]

Re: C-T-E: base64 and the real world.. what should an MUA do?

2008-04-22 00:55:08

Valdis Klētnieks writes:
Of course, the last 5 lines are bogus as base64, and it's easy to just say "Majordomo is at fault". But such things happen in the real world, and what's the recommended algorithm for an MUA to recover from this?

Stop decoding at '=' (that's two thirds of the cases). Stop decoding when you see "--" at the beginning of a line (that's most of the rest).

And if all else fails, following the rules in RFC 2045 result in a few random bytes at/after the end of the decoded data. Usually harmless.

Arnt

<Prev in Thread] Current Thread [Next in Thread>