Open Bug 69170 Opened 24 years ago Updated 16 years ago

Splitting MIME-encoded words does not include meaningful SP

Categories

(MailNews Core :: MIME, defect)

x86
Windows NT
defect
Not set
major

Tracking

(Not tracked)

People

(Reporter: momoi, Assigned: smontagu)

References

()

Details

Attachments

(1 file)

** Observed with 1/16/2001 Mtrunk Build **

Under conditions that have to do with the length of 
the first encoded word in the To: header field, the
second encoded may be split into 2. When there is
an original sequence that contains a meaningful Space
character, that character needs to be encoded since
spaces between encoded words are not meaningful. 
But we don't encode such SP character. Instead,
we produce a sequence of the following kind:

-----
To: =?ISO-2022-JP?B?GyRCRVo6NBsoQiAbJEI4JBsoQg==?= 
	<test1test2test3t@polyglot.mcom.com>,
	=?ISO-2022-JP?B?GyRCPSlFRBsoQg==?=
	 
	=?ISO-2022-JP?B?GyRCOCQbKEI=?= <test1test2test3@polyglot.mcom.com>
-----

where between the split encoded words, we have 

0x0D 0x0A 0x09 0x20 0x0D 0x0A 0x09

There seem to be a couple of things wrong with this
sequence:

1. The meaningful SP (0x20) is not encoded and a program can 
    thus ignore it.
2. It is inserting a blank line (CRLF) with a TAB at the end
    then followed by the SP and CRLF and a TAB.

I'm not sure what should be the correct way to split
such encoded words is in case, the line breaking
forces a split.
Please investigate what if any we can do about this.
Assigning this to nhotta initially.
Assignee: ducarroz → nhotta
To re-create this problem, you can send a message
using the 2 strings I attach in an HTML file as
the Address line data for outgoing mail. These
contain bogus addresses and so may get an error msg
but you can save a copy in a local folder and examine
the source of such a msg.
CC;ing a bunch of iqa people.
The relevant RFC is 2047. See in particular the following
section:

5. Use of encoded-words in message headers

It seems clear that if the SP is meaningful, then it
must be part of one of the encoded words in this case.

In the attached test strings, the Japanese names (LAST <SP> FIRST)
are separated by a single SP character.
The endcoder appears to be using intlmime_encode_next8bitword() in order to 
ensure spaces get encoded when necessary.  It is not clear why this isn't 
working correctly.
I've confirmed that neither 

=?ISO-2022-JP?B?GyRCPSlFRBsoQg==?=

nor 

=?ISO-2022-JP?B?GyRCOCQbKEI=?=

contains the original SP character which
separated the Last name from First name. In the
Message envelope pane, the orignla "AB C" in Chinese
is displayed as "ABC" when this problem occurs.
Just a wild guess but when there is a sequence of the
following type:

AB C <a_very_long_email_id@somwhere.com>

where A, B, C are Japanese words and need to be MIME-encoded.

When A, B, C are encoded, somehow, the header line folding occurs 
in such a way as to cause a split right where the "AB" sequence
ends, somwhow the following SP is not encoded but used as a separator
between the 2 encoded words. 
Note the the first address-to line contains nearly identical 

XY Z  <a_very_long_email_id1@somwhere.com>

But this does not get split and contains the SP in the
encoded portion.
Target Milestone: --- → mozilla0.9.1
Target Milestone: mozilla0.9.1 → Future
Status: NEW → ASSIGNED
Product: MailNews → Core
both naoki and I are off mozilla for about 20 monthes. If these bugs are still
here, the real status is 'wont fix'. If you want to reopen it, please find a
better owner who really looking at the bug database now. 
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
Mass Reassign Please excuse the spam
Assignee: nhottanscp → nobody
Mass Re-opening Bugs Frank Tang Closed on Wensday March 02 for no reason, all
the spam is his fault feel free to tar and feather him
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Reassigning Franks old bugs to Jungshik Shin for triage - Sorry for spam
Assignee: nobody → jshin1987
Status: REOPENED → NEW
Assignee: jshin1987 → smontagu
QA Contact: esther → mime
Product: Core → MailNews Core
Target Milestone: Future → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: