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

Tony Hansen <[email protected]>
Newsgroups gmane.ietf.rfc822
Message-ID <[email protected]>
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
	[email protected]

[email protected] 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 ---
> IGRldmljZV9yZW1vdmVfZmlsZShkZXYsICZkZXZ0X2F0dHIpOwo+ICAgICAgICAgfQo+ICAgICAg
> ICAgaWYgKGRldi0+Y2xhc3MpIHsKPgo+ICAtLQoKQXBwbHlpbmcgdGhpcyBwYXRjaCB3b3JrZWQg
> Zm9yIG1lLgoKVGhhbmtzIQogICAgICBNaWxlcwo=
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> --- 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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.