Closed Bug 142672 Opened 22 years ago Closed 22 years ago

Badly-formed multipart/alternative mail shows no content

Categories

(MailNews Core :: MIME, defect)

x86
All
defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: kbriscoe, Assigned: bugzilla)

Details

(Keywords: dataloss, Whiteboard: have fix)

Attachments

(1 file)

Build 2002042808/1.0 branch/Linux.

An automated e-mail from Amazon.com uses a bad multipart/alternative encoding. 
Mozilla displays nothing in the message body.

Here's the message source (with private info XXX'd out):
-------------------------
From - Mon May  6 17:46:49 2002
X-UIDL: 4ac11d491d460000
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Received: by XXX.XXX.XXX (mbox XXX)
 (with Cubic Circle's cucipop (v1.31 1998/05/13) Mon May  6 17:45:58 2002)
X-From_: XXX@bounces.amazon.com  Mon May  6 01:58:25 2002
Return-Path: <XXX@bounces.amazon.com>
Received: from mm-outgoing-108.amazon.com (mm-outgoing-108.amazon.com
[207.171.188.109])
	by frankenstein.nwlink.com (8.11.3/8.11.3) with ESMTP id g468wPn39227
	for <cheeth@nwlink.com>; Mon, 6 May 2002 01:58:25 -0700 (PDT)
	(envelope-from XXX@bounces.amazon.com)
Received: from mail-ems-104.amazon.com by mm-outgoing-108.amazon.com with ESMTP 
	(crosscheck: mail-ems-104.amazon.com [10.16.42.233])
	id BAA-7025040-23358; Mon, 6 May 2002 01:54:59 -0700
Received: by mail-ems-104.amazon.com
	id AAA-7025040-03405,20; 6 May 2002 01:54:51 -0700
Date: 6 May 2002 01:54:51 -0700
Message-ID: <.AAA-7025040-03405,20.1020675291@mail-ems-104.amazon.com>
X-AMAZON-TRACK: 7025040 
To: XXX
From: "Amazon.com" <gc-orders@amazon.com>
Subject: XXX sent you an Amazon.com Gift Certificate - Want to use it?
Bounces-to: XXX@bounces.amazon.com
MIME-Version: 1.0
Content-Type: Multipart/Alternative;boundary=MuLtIpArT_BoUnDaRy

--MuLtIpArT_BoUnDaRy
Content-Type: text/plain;

Dear Amazon.com Gift Certificate Recipient,

This is a friendly reminder about the 30.00 dollar Amazon.com gift 
certificate that was sent to you nine months ago by XXX, but has 
not yet been redeemed. Use it today before it expires and treat yourself to 
something you've had your eye on--music, books, videos, toys, games, 
electronics, things for the home, gifts, and much more.

If nothing comes to mind immediately, click the link below and browse 
through our top sellers. Something will surely spark your interest:
http://www.amazon.com/exec/obidos/subst/stores/gifts/topsellers.html/

To redeem your gift certificate, just follow the easy three-step 
instructions below.

Happy shopping,
Your Friends at Amazon.com

Don't delete this information.
(You'll need it to redeem your gift certificate.)

To: XXX
From: XXX
Amount: 30.00
Claim Code: 6UU7-SA8LUS-XMNA
*Expiration Date: 05-Aug-2002
Message: XXX

Using your gift certificate is easy:
1. Visit our Web site at http://www.amazon.com
2. Select the items you want and add them to your shopping cart.
3. When you have found the items you want, click the Proceed to checkout 
button. You can claim your gift certificate by entering its claim code 
number right on the order form.

Do you want to redeem your gift certificate but you're just not ready to 
make a purchase?
Visit the http://www.amazon.com/exec/obidos/tg/redeem-gc/-/XXX
page and deposit your gift certificate for future use!

The Fine Print:
1. Gift certificates must be redeemed through our Web site, 
http://www.amazon.com, toward the purchase of products listed in 
Amazon.com's online catalog and sold by Amazon.com. They cannot be redeemed 
at Amazon.co.uk, Amazon.de, Amazon.fr, Amazon.co.jp or any other Web site 
operated by Amazon.com, its affiliates, or third-party merchants accessible 
from our site (including, for example, our Health & Beauty store operated 
by drugstore.com). Gift certificates are not valid for payment at 
Amazon.com Marketplace, Auctions or zShops.
2. Gift certificates cannot be used to pay for out-of-print titles.
3. Gift certificates are not redeemable for cash and cannot be returned for 
a cash refund.
4. Any unused balance will be placed in the recipient's gift certificate 
account.
5. If your order exceeds the amount of your gift certificate, you must pay 
for the balance with a credit card.
6. Please use our Shopping Cart rather than our 1-Click ordering if you 
wish to pay for your order with a gift certificate.
7. Gift certificate cash value is 1/10 of one cent.
8. Gift certificates and their use on our Web site are subject to our 
general Conditions of Use.
9. Amazon.com reserves the right to change these terms and conditions from 
time to time in its discretion.
10. Gift certificates and unused portions of gift certificates expire one 
year from the date of issue.*
11. Sorry, we cannot replace and are not responsible for lost or stolen 
gift certificates. If you have any questions, send us e-mail at 
orders@amazon.com.
12. AMAZON.COM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO 
GIFT CERTIFICATES, INCLUDING WITHOUT LIMITATION, ANY EXPRESS OR IMPLIED 
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN THE 
EVENT A GIFT CERTIFICATE CODE IS NON-FUNCTIONAL, YOUR SOLE REMEDY, AND OUR 
SOLE LIABILITY, SHALL BE THE REPLACEMENT OF SUCH GIFT CERTIFICATE. CERTAIN 
STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION 
OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL 
OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY NOT APPLY TO YOU, 
AND YOU MIGHT HAVE ADDITIONAL RIGHTS
*  Does not apply in California; applies in New Hampshire only for gift 
certificates over $100. Expiration date does not apply in any other states 
where prohibited by law.

To unsubscribe from Amazon.com Gift Certificate Reminders or to subscribe 
to additional e-mail services, visit your Amazon.com <account page>.

--MuLtIpArT_BoUnDaRy
Content-Type: text/html;

<html>
<head>
<title>You Have A Gift from Amazon.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">
<table width="630" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> 
<td> 
<div align="left"><a
href="http://www.amazon.com/exec/obidos/subst/home/home.html/"><img
src="http://images.amazon.com/images/G/01/marketing/html-mailings/assets/amazon.gif"
width="151" height="45" border="0"></a></div>
</td>
</tr>
</table>

<table width="630" border="0" cellspacing="0" cellpadding="1" align="center"
bgcolor="#330099">
  <tr> 
<td> 
<table border=0 width=628 cellpadding=0 cellspacing=0 align="center"
bgcolor="#FFFFFF">
<tr valign=top> 
<td width="480" align="center"> 
            
<a href="http://www.amazon.com/exec/obidos/subst/home/home.html/"><img
src="http://images.amazon.com/images/G/01/gifts/certificates/foil-banner.gif"
width="630" height="100" border="0"></a>

<table width="628" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="60" align="left" valign="top"> 
                  
<div align="left"><img
src="http://images.amazon.com/images/G/01/gifts/certificates/foil-left.gif"
width="60" height="86"></div>
                </td>
                <td width="456"><font face=Verdana size=3> 
                  <p><b><font face="Times New Roman, Times, serif"><br>
                    Dear Amazon Gift Certificate Recipient,</font></b></p>
                  <p><font face="Times New Roman, Times, serif">
                    This is a friendly reminder about the 30.00 dollar 
Amazon.com gift
                    certificate that was sent to you nine months ago by 
                    XXX, but has not yet been redeemed. Use it 
today before it
                    expires and treat yourself to something you've had your 
eye on--music, books, videos, toys,
                    games, electronics, things for the home, gifts, and 
much more.</font></p>
                  <p><font face="Times New Roman, Times, serif">If nothing 
comes 
                    to mind immediately, browse through our 
</font><font face="Times New Roman, Times, serif" size="3"><a 
           
href="http://www.amazon.com/exec/obidos/subst/stores/gifts/topsellers.html">Top 

Sellers</a></font><font face="Times New Roman, Times, serif">. 
                    Something will surely spark your 
interest.</font><font 
            face=Verdana size=3> 
<font 
            face=Verdana size=3><font 
            face=Verdana size=3><font face="Times New Roman, Times, serif"
size="3"><img
src="http://images.amazon.com/images/G/01/gifts/certificates/foil-box.gif"
width="132" height="126" align="right"><br>
                    </font></font></font></font></p>
                  </font><font 
            face=Verdana size=3> 
                  <p><font face="Times New Roman, Times, serif" size="3">To 
redeem 
                    your gift certificate, just follow the easy three-step 
instructions 
                    below.</font></p>
                  
<p><font face="Times New Roman, Times, serif" size="3">Happy 
                    shopping,</font></p>
                  
<p><font face="Times New Roman, Times, serif" size="3">Your 
                    Friends at 
<a href="http://www.amazon.com/exec/obidos/subst/home/home.html/">Amazon.com</a> 

                    </font></p>
                  <p>&nbsp;</p>
                  </font></td>
                <td width="97" align="right" valign="top"> 
                  
<div align="right"><img
src="http://images.amazon.com/images/G/01/gifts/certificates/foil-right.gif"
width="97" height="139"></div>
                </td>
              </tr>
            </table>
            
</td>
</tr>
</table>
</td>
</tr>
<tr align="center" valign="middle"> 
<td height="52"> 
      
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"
align="center">
        <tr align="left" valign="top"> 
          <td> 
            
<table width="100%" border="0" cellspacing="10" cellpadding="0">
              <tr>
                <td>
                  
<p align="left"><font size="3" face="Times New Roman, Times, serif">We 
                    hope you enjoyed receiving this message. However, if 
you'd 
                    rather not receive future e-mails of this sort from 
Amazon.com, 
                    please visit your 
<a href="http://www.amazon.com/exec/obidos/account-access-login/">Amazon.com 

                    account page</a> and under the Your Account Settings 
heading, 
                    click the "Update your communication preferences" 
link.</font></p>
                  
<p><font face="Times New Roman, Times, serif"><b><font size="3"
color="#330099">Don't 

                    Delete this information - You'll need it to redeem your 
gift 
                    certificate.</font></b><font size="3"><br>
                    
</font></font><font face="Times New Roman, Times, serif"><font 
            size=3><br>
                  To: XXX<br>
                  Amount: 30.00<br>
                  Claim Code: XXX<br>
                  Expiration Date: 05-Aug-2002<br>
                 
<table border="0" cellpadding="0" cellspacing="0" width="100%">
                 <tr><td width="0%" valign="top">Message:  </td>
                 <td width="100%">XXX</td></tr>
                 </table></font></font></p>
                  
<p><font face="Times New Roman, Times, serif" size="3">Using 
                    your gift certificate is easy:</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">1. 
Go 
                    to 
<a 
           
href="http://www.amazon.com/exec/obidos/subst/home/home.html/">http://www.amazon.com/</a>,


                    select the items you want, and add them to your 
Shopping Cart.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">2. 
Click 
                    the Proceed to Checkout button. At the Pay section of 
the 
                    progress bar, you'll see a box on the lower part of the 
page 
                    that says, "Received a Gift Certificate?"</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">3. 
Simply 
                    enter your claim code in the space provided to redeem 
your 
                    gift certificate. Then click the Continue button and 
complete 
                    the order form.</font></p>
                  
<p><font face="Times New Roman, Times, serif" size="3">You'll 
                    know you have placed your order when you reach a screen 
that 
                    says, "Thank you--we have received your order." On this 
page, 
                    you'll be able to see that your gift certificate has 
been 
                    deducted from the total cost of your order.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">If 
you 
                    click on the Your Account button, located on the top 
right-hand 
                    corner of our home page, you'll be able to view details 
of 
                    your order.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">Do 
you 
                    want to redeem your gift certificate but you're just 
not ready 
                    to make a purchase? Visit the 
<a href="http://www.amazon.com/exec/obidos/tg/redeem-gc/-/XXX">your 

                    account</a> page and deposit your gift certificate for 
future 
                    use!</font></p>
                  
<p><font face="Times New Roman, Times, serif" size="3">The Fine 
                    Print:</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   1. Gift certificates must be redeemed through our Web 
site, 
                   
<a href="http://www.amazon.com/">http://www.amazon.com</a>, toward the 
purchase of products listed in 
                   Amazon.com's online catalog and sold by Amazon.com. They 
cannot be redeemed 
                   at Amazon.co.uk, Amazon.de, Amazon.fr, Amazon.co.jp or 
any other Web site 
                   operated by Amazon.com, its affiliates, or third-party 
merchants accessible 
                   from our site (including, for example, our Health & 
Beauty store operated 
                   by drugstore.com). Gift certificates are not valid for 
payment at 
                   Amazon.com Marketplace, Auctions or zShops.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   2. Gift certificates cannot be used to pay for 
out-of-print titles.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   3. Gift certificates are not redeemable for cash and 
cannot be returned for 
                   a cash refund.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   4. Any unused balance will be placed in the recipient's 
gift certificate 
                   account.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   5. If your order exceeds the amount of your gift 
certificate, you must pay 
                   for the balance with a credit card.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   6. Please use our Shopping Cart rather than our 1-Click 
ordering if you 
                   wish to pay for your order with a gift 
certificate.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   7. Gift certificate cash value is 1/10 of one 
cent.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   8. Gift certificates and their use on our Web site are 
subject to our 
                   general Conditions of Use.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   9. Amazon.com reserves the right to change these terms 
and conditions from 
                   time to time in its discretion.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   10. Gift certificates and unused portions of gift 
certificates expire one 
                   year from the date of issue.*</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   11. Sorry, we cannot replace and are not responsible for 
lost or stolen 
                   gift certificates. If you have any questions, send us 
e-mail at 
                   orders@amazon.com.</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   12. AMAZON.COM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, 
WITH RESPECT TO 
                   GIFT CERTIFICATES, INCLUDING WITHOUT LIMITATION, ANY 
EXPRESS OR IMPLIED 
                   WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
PURPOSE. IN THE 
                   EVENT A GIFT CERTIFICATE CODE IS NON-FUNCTIONAL, YOUR 
SOLE REMEDY, AND OUR 
                   SOLE LIABILITY, SHALL BE THE REPLACEMENT OF SUCH GIFT 
CERTIFICATE. CERTAIN 
                   STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED 
WARRANTIES OR THE EXCLUSION 
                   OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO 
YOU, SOME OR ALL 
                   OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY 
NOT APPLY TO YOU, 
                   AND YOU MIGHT HAVE ADDITIONAL RIGHTS</font></p>
                  <p><font face="Times New Roman, Times, serif" size="3">
                   *  Does not apply in California; applies in New 
Hampshire only for gift 
                   certificates over $100. Expiration date does not apply 
in any other states 
                   where prohibited by law.</font></p>
            </td>
              </tr>
            </table>
            
          </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

--MuLtIpArT_BoUnDaRy

.
------------------end of message source---

If I recall correctly, the final multipart boundary needs to be surrounded by
"--" on BOTH sides of the boundary.  This may be what is making Mozilla barf.

I set severity to "major" because amazon.com is unlikely to fix this, and other
sites may use the same software package.
QA Contact: gayatri → esther
Status: UNCONFIRMED → NEW
Ever confirmed: true
Here's a simpler example of the same behavior.  Mozilla shows NOTHING for this
email.  You might argue it's a good thing, since you can't download the Virus,
but really it's a bad thing that nothing shows up at all :-).


MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary=JW4J5o703y69Pjt3X6294zo8HGyIDl4e

--JW4J5o703y69Pjt3X6294zo8HGyIDl4e
Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable

<HTML><HEAD></HEAD><BODY>

<FONT>W32.Elkern  is a  dangerous virus that can infect on Win98/Me/2000/XP.<br>
Mcafee give you the W32.Elkern  removal tools<br>
<br>
For more information,please visit http://www.Mcafee.com</FONT></BODY></HTML>

--JW4J5o703y69Pjt3X6294zo8HGyIDl4e
Content-Type: application/octet-stream;
	name=install.exe
Content-Transfer-Encoding: base64
Content-ID: <Rfh1t95o5785CW34>

TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA2AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4g
RE9TIG1vZGUuDQ0KJAAAAAAAAAAYmX3gXPgTs1z4E7Nc+BOzJ+Qfs1j4E7Pf5B2zT/gTs7Tn
Verified above with with:
   Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020424
Acceptable behavior in this case would be to show the invalid message as plain text.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2alpha
I found the problem: when we read the last part separator (which should be in
fact a part terminator), we create a new alternative child part and consider it
as displayable but has it's empty, thereis nothing to show. The fix is that when
we don't have a content-ype to not consider the part as displayable (that affect
only related parts).
Keywords: dataloss, nsbeta1
OS: Linux → All
Whiteboard: have fix
Target Milestone: mozilla1.2alpha → mozilla1.0
Attached patch Proposed fix, v2Splinter Review
An alternative part with no content-type should not be displayed. That append
only with bogus part.
I have that fix in my Mac build for couple weeks now and it works great.
Comment on attachment 84076 [details] [diff] [review]
Proposed fix, v2

Seems good to me.
r=varada
Attachment #84076 - Flags: review+
Comment on attachment 84076 [details] [diff] [review]
Proposed fix, v2

sr=bienvenu
Attachment #84076 - Flags: superreview+
fix checked in the trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Using the sample mail message stated in the original comment, I can see the
message when  viewing in Original HTML but nothing shows up when viewing in
Simple HTML.  If this bug.  This bug as oringinaly stated can be verified, and
the problem with Simple HTML viewing would be part of bug 138125.  Verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: