[Top] [All Lists]

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

2008-04-21 20:04:41

If there's a padding "=" at the end of the base64, you can stop processing right at that point. You *could* also stop processing when you run into a non-whitespace character that isn't in the base64 alphabet, such as the "-" or ":" in your example. It's not perfect.

        Tony Hansen

Valdis(_dot_)Kletnieks(_at_)vt(_dot_)edu wrote:
(Sorry I've been silent on this list for a while, I've been off doing other
stuff for the nonce and only posting if something egregious happened to
catch my eye...)

OK, so the following mail showed up on the linux-kernel mailing list (and it's
not a singleton mail, I've seen this same broken behavior a lot lately...)

It had 1 bodypart, correctly tagged as

Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: base64

Majordomo then goes and sticks some stuff on the end, so the last few lines
of the message are:

--- cut here ---
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(_at_)vger(_dot_)kernel(_dot_)org
More majordomo info at
Please read the FAQ at
--- cut here ---

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?

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