incorrect handling of escaped quotation marks in e-mail addresses



17 years ago
10 years ago


(Reporter: dwallach, Unassigned)


Firefox Tracking Flags

(Not tracked)




17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)
BuildID:    20020530

I have a student whose e-mail address has quotation marks in his name.  Mail 
from him looks like this:

From: "Tsuen-Wan \"Johnny\" Ngan" <>
To: Dan Wallach <>

In the address book for auto-collected addresses, Mozilla gets this:

First: Tsuen-Wan \"Johnny\"
Last: Ngan
Display: Tsuen-Wan \"Johnny\" Ngan

So far, it's all reasonable.  However, when I composed an e-mail to a list of 
names including this one, here's what was ultimately transmitted:

To: "Eric E. Allen" <>, 
 "Johnny\" Ngan <>,
	Scott Crosby <>,
	David Wray Price <>, Algis Rudys <>

Needless to say, this confused the local mail transport (in particular, it 
freaked out the AMaViS anti-virus software), and some of the people didn't get 
the message.

Removing the quotation marks fixed the problem.

Reproducible: Always
Steps to Reproduce:
Add a weird entry, as above to your address book.  Send a message to that 
address with some other ones.  Go look in your sent mail folder and see the 
carnage that came out.

Actual Results:  Bogus e-mail headers.

Expected Results:  Non-bogus e-mail headers.
related: bug 89198 bug 39955 bug 134277 bug 18676 bug 117975

Couldn't reproduce the problem on linux trunk cvs 2002-07-11.
- Changed sender address on a mail account, sender name of form:
    foo "foo" foo
- Sent mail to myself to get the address collected
- Sent a mail to the collected address as autocompleted and another address
- Name was quoted correctly in headers on the mail in Sent folder and on the
received message.
- Did a "Reply all" of the message -> everything still quoted correctly.
- The first/last names on the collected ab card don't look too good though:
  firstname: "foo \"foo\"
  lastname:  foo"
  display:   "foo \"foo\" foo"
Oh, nice, it is massively hosed in branch builds 2002-06-13-07-1.0.0,
2002-07-11-07-1.0. It fails at the "Sent mail to myself to get the address
collected" step already, as the From address is mangled:
    From: "foo\" foo <whatever@server.bah>
and coming back from the server:
    From: "foo\" foo <whatever@server.bah>"

Apparently all this has been fixed on trunk by bug 134277...?
Depends on: 134277
Ever confirmed: true
OS: Windows 2000 → All

Comment 3

15 years ago
In 1.5 Final, I see the exact symptom described in the original report.  The 
mail is sent correctly to all addresses.  In the message window's envelope, the 
invalid name appears as:     Johnny Ngan <>

Both mail servers that received this message did not have any problem receiving 
it, but the headers are just as described.
Product: MailNews → Core

Comment 4

13 years ago
with SM suite
I see something similar to comment 2, 
 address book Tsuen-Wan \"Johnny\" Ngan
      compose Tsuen-Wan \"Johnny\" Ngan <a@b.c>
     receiver "Johnny\" Ngan <a@b.c>" 

relationship to bug 122352, bug 12427, bug 134277 (which didn't fix this bug), bug 222895?
Assignee: ducarroz → nobody
QA Contact: esther → composition


10 years ago
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.