Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unreadable email (text/html , charset=utf-8 base64 encoding)

2,378 views
Skip to first unread message

JF Mezei

unread,
Mar 24, 2012, 5:25:40 PM3/24/12
to
The local grocery store seems to like to make things more complicated
than they need to me. A simple "password reset" on my account results in
an unreadable email being sent to me.

Both for thunderbird and "mail.app"

Thunderbird has html disabled. That is what I use to read emails. I only
use Mail.App to read emails that I know are from a good source and which
thunderbird won't display.


Here is the relevant portion of the source of the email:


<top portion of header trimmed>
Reply-To: consom...@metro.ca
Message-Id: <201203242048...@tor1ap1.givex.com>
Date: Sat, 24 Mar 2012 16:48:15 -0400 (EDT)

No mimetype support
--===============2069567805718324933==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64

Lg==

--===============2069567805718324933==
Content-Type: text/html; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64

PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs
Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h
bC5kdGQiPg0KPGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPg0KPGhl
YWQ+DQo8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsg



What is interesting is that Mail.App simplay what appears to be a single
dot in te content pane. The header appears to be parsed properly (for
sender, to, subject and date)

Is there anything obvious in the above snippet that would cause neither
Thunderbird nor Mail to display the contents ?


Also, if I were to save this to a disk file, is there a built in tool to
convert the html attachement to a text file i could then open in a
browser ? (such as uudecode etc).

On VMS, there is a utility called "mime" that would be able to convert
the base 64 to text (but some of it woudl be unreadable due to it being
utf-8 instead of latin 1)

David Ritz

unread,
Mar 24, 2012, 6:24:52 PM3/24/12
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday, 24 March 2012 17:25 -0400,
in article <4f6e3bd5$0$27709$c3e8da3$14a0...@news.astraweb.com>,
JF Mezei <jfmezei...@vaxination.ca> wrote:

> The local grocery store seems to like to make things more
> complicated than they need to me. A simple "password reset" on my
> account results in an unreadable email being sent to me.

> Both for thunderbird and "mail.app"

> Thunderbird has html disabled. That is what I use to read emails. I
> only use Mail.App to read emails that I know are from a good source
> and which thunderbird won't display.

> Here is the relevant portion of the source of the email:

> --===============2069567805718324933==
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: base64
>
> Lg==
>
> --===============2069567805718324933==
> Content-Type: text/html; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: base64
>
> PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs
> Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h
> bC5kdGQiPg0KPGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPg0KPGhl
> YWQ+DQo8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsg

Note that these lines are longer than allowed for b64 encoding.

> What is interesting is that Mail.App simplay what appears to be a
> single dot in te content pane. The header appears to be parsed
> properly (for sender, to, subject and date)

Guess what? That 'dot', a period as it were, is the entire content of
the text portion of the message.

> Is there anything obvious in the above snippet that would cause neither
> Thunderbird nor Mail to display the contents ?

Actually, they are displaying the messages correctly. What's b0rken
is the message itself. The text portion of the message consists of a
single period. The html portion has no content; only a partial
header:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;

> Also, if I were to save this to a disk file, is there a built in tool to
> convert the html attachement to a text file i could then open in a
> browser ? (such as uudecode etc).

There's a handy little command line tool, at your disposal. Like so
many *nix tools, its name is a bit obscure. It's called base64. On
most OS X Macs, it's located at /usr/bin/base64.

The content transfer encoding won't be a problem, if you just set your
terminal display to the desired encoding. Since you're looking at
base64 encoded 7-bit US-ASCII text, it's not going to matter, in the
least, how the display encoding is set.

Whatever your grocer is using for sending software is seriously FUBAR.

> On VMS, there is a utility called "mime" that would be able to
> convert the base 64 to text (but some of it woudl be unreadable due
> to it being utf-8 instead of latin 1)

I wouldn't know.

HTH.

- --
David Ritz <dr...@mindspring.com>
Be kind to animals; kiss a shark.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (Darwin)
Comment: Public Keys: <http://dritz.home.mindspring.com/keys.txt>

iEYEARECAAYFAk9uSbYACgkQUrwpmRoS3utiqwCfWHO21phWbBSST9IxNpJaK+PL
4O8AoLFUf2mBmUFXs0G1/TUNlrDdCy9n
=cLod
-----END PGP SIGNATURE-----

JF Mezei

unread,
Mar 24, 2012, 7:16:31 PM3/24/12
to
David Ritz wrote:

> Guess what? That 'dot', a period as it were, is the entire content of
> the text portion of the message.


But...

Reply-To: consom...@metro.ca
Message-Id: <201203242048...@tor1ap1.givex.com>
Date: Sat, 24 Mar 2012 16:48:15 -0400 (EDT)

No mimetype support
--===============2069567805718324933==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64

Lg==

--===============2069567805718324933==
Content-Type: text/html; charset="utf-8"


If the mail client doesn't support "mime", it should display "No
mimetype support followed by ll the gibberish below it.

If the mail client supports mime but has "html" disabled, it should see
the "Lg==" and display the contents as "Lg="

And if the mail client supports mime and has the insecure html decoding
enabled, it should display the contents.

There is no "." in there.


> single period. The html portion has no content; only a partial
> header:

That is because I didn't paste it all.


> There's a handy little command line tool, at your disposal. Like so
> many *nix tools, its name is a bit obscure. It's called base64. On
> most OS X Macs, it's located at /usr/bin/base64.

thanks. managed to get the base 64 decoded and used fireforx to display
the contents.


> Whatever your grocer is using for sending software is seriously FUBAR.

OK, I found it !!!!!

In the header:

Content-Type: multipart/alternative;
boundary="===============2069567805718324933=="

In the content:

--===============2069567805718324933==

--===============2069567805718324933==

They start the line with 2 dashes, so the client probably doesn't
recognize the boundary.

JF Mezei

unread,
Mar 24, 2012, 7:25:48 PM3/24/12
to
JF Mezei wrote:

>
> In the header:
>
> Content-Type: multipart/alternative;
> boundary="===============2069567805718324933=="
>
> In the content:
>
> --===============2069567805718324933==
>
> --===============2069567805718324933==
>


Oops !

It appears that starting the boundary string with 2 hypens is part of
the standard. So that's not it :-(

David Ritz

unread,
Mar 24, 2012, 11:25:00 PM3/24/12
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday, 24 March 2012 19:16 -0400,
in article <4f6e55d0$0$1692$c3e8da3$92d0...@news.astraweb.com>,
JF Mezei <jfmezei...@vaxination.ca> wrote:

> David Ritz wrote:

>> Guess what? That 'dot', a period as it were, is the entire content
>> of the text portion of the message.

> But...

> Reply-To: consom...@metro.ca
> Message-Id: <201203242048...@tor1ap1.givex.com>
> Date: Sat, 24 Mar 2012 16:48:15 -0400 (EDT)

> No mimetype support
> --===============2069567805718324933==
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: base64
>
> Lg==
>
> --===============2069567805718324933==
> Content-Type: text/html; charset="utf-8"

> If the mail client doesn't support "mime", it should display "No
> mimetype support followed by ll the gibberish below it.

> If the mail client supports mime but has "html" disabled, it should see
> the "Lg==" and display the contents as "Lg="

> And if the mail client supports mime and has the insecure html
> decoding enabled, it should display the contents.

> There is no "." in there.

Of course there is. You just can't see it, because it's base64
encoded as 'Lg=='.

Since you do not appear to either understand or believe me, you can
easily demonstrate this for yourself.

Fire up /Applicattions/Utilities/Terminal.app.
At the prompt, type 'nano tmp <RETURN>'.
Type or copy and paste 'Lg==' into the body of your tmp file.
Type ^X (control-x) and 'y' (yes) when asked to save and <RETURN>.
Finally, type 'base64 -D tmp <RETURN>' at the command prompt.

I'm fairly confident you'll find a single period as the output.

>> single period. The html portion has no content; only a partial
>> header:

> That is because I didn't paste it all.

That's possible. I could only decode that portion which you provided.

>> There's a handy little command line tool, at your disposal. Like
>> so many *nix tools, its name is a bit obscure. It's called base64.
>> On most OS X Macs, it's located at /usr/bin/base64.

> thanks. managed to get the base 64 decoded and used fireforx to
> display the contents.

>> Whatever your grocer is using for sending software is seriously
>> FUBAR.

> OK, I found it !!!!!

> In the header:

> Content-Type: multipart/alternative;
> boundary="===============2069567805718324933=="
>
> In the content:
>
> --===============2069567805718324933==
>
> --===============2069567805718324933==
>
> They start the line with 2 dashes, so the client probably doesn't
> recognize the boundary.

That's a good guess. As with many guesses, it's wrong.

I was aware you hadn't provided the full message, as the final MIME
boundary was missing. If you look at the source, again, that final
boundary ends with two dashes, just as all the boundaries begin with
the same two characters. It should read:

--===============2069567805718324933==--

If you still have access to the message in Mail.app, you should be
able to reveal the rendered HTML, by typing 'option+command+]' or
selecting 'View:Message:Next Alternative' in the menu bar.

- --
David Ritz <dr...@mindspring.com>
Be kind to animals; kiss a shark.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (Darwin)
Comment: Public Keys: <http://dritz.home.mindspring.com/keys.txt>

iEYEARECAAYFAk9ukA0ACgkQUrwpmRoS3uutbwCeJHDDXtwYpquBROQXE8F9H0iR
HPIAnimhuoJ3/jrvJsleqbvKCB4sryG5
=Axqr
-----END PGP SIGNATURE-----

JF Mezei

unread,
Mar 25, 2012, 1:45:32 AM3/25/12
to
David Ritz wrote:

>> There is no "." in there.
>
> Of course there is. You just can't see it, because it's base64
> encoded as 'Lg=='.


Silly me ! Sorry about that. I just keep on assuming that people will
send plain text as plain text and not have gratuitous base64 where it is
not needed.


> If you still have access to the message in Mail.app, you should be
> able to reveal the rendered HTML, by typing 'option+command+]' or
> selecting 'View:Message:Next Alternative' in the menu bar.


That did the trick. And it honoured the "don't load external images" in
my settings.

(I hate HTML emails because they almost always either spam, phishing
attempts or try to get you to download a virus or something. (not that I
fear those since I am on a mac).

Wes Groleau

unread,
Mar 25, 2012, 1:00:04 PM3/25/12
to
On 03-25-2012 01:45, JF Mezei wrote:
> (I hate HTML emails because they almost always either spam, phishing
> attempts or try to get you to download a virus or something. (not that I
> fear those since I am on a mac).

I get very little phishing or spam these days, but I hate HTML e-mails
because they are too often from some MS Office program, which insists on
embedding ALL the CSS and XML to support any formatting option that
is available in any Office program, whether used or not. Not to mention
HTML to frequently turn formatting off and back on with no content between.

--
Wes Groleau

Always listen to experts. They'll tell you
what can't be done and why. Then do it.
— Robert A. Heinlein

Message has been deleted

windao...@gmail.com

unread,
Mar 12, 2020, 4:56:21 PM3/12/20
to
Een nabzjxmjxh❤️📥😳🙏😒❤️🧡😡😂🤯🙏🧡😍🌺
0 new messages