ietf-822
[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
        tony(_at_)att(_dot_)com

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 ---
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 majordomo(_at_)vger(_dot_)kernel(_dot_)org
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?

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