Closed Bug 1223136 Opened 9 years ago Closed 7 years ago

Invalid address headers due to unquoted display-name with special characters

Categories

(MailNews Core :: MIME, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1359774

People

(Reporter: github, Unassigned)

Details

I've seen some cases of failed message submission to an exim server with 'verify = header_syntax'. The problem are addresses in the form

To: example@work <user@example.com>

which might be a regression introduced in https://bugzilla.mozilla.org/show_bug.cgi?id=1130248 . 

The above display-name has to be written as quoted-string, i.e.

To: "example@work" <user@example.com>

I opened an issue in https://github.com/mozilla-comm/jsmime/issues/15 about the introduced test, but I've not dived into headerparser.js yet.
Summary: Inavalid address headers due to unquoted display-name with special caharcters → Invalid address headers due to unquoted display-name with special caharcters
Fixing more spelling mistakes in the summary.

Michael, please add detailed steps to reproduce, actual result, expected result.
Summary: Invalid address headers due to unquoted display-name with special caharcters → Invalid address headers due to unquoted display-name with special characters
Iirc, we don't show quotes around display names in the UI, but jsmime adds them lateron in the process.
Compose a mail to „test@home <github@konfusator.de>“ (note the misssing quotes)

Exim (with an active „verify = header_syntax“ ACL) rejects the message as syntactically invalid:

2015-12-01 00:31:23 1a3Xul-000762-4M H=([192.168.1.112]) [192.168.1.112] F=<github@konfusator.de> rejected after DATA: malformed address: <github@konfusator.de>\n may not follow test@home : failing address in "To:" header is: test@home <github@konfusator.de>
Envelope-from: <m@konfusator.de>
Envelope-to: <github@konfusator.de>
P Received: from [192.168.1.112]
        by rantanplan.local.konfusator.de with esmtp (Exim 4.86)
        (envelope-from <github@konfusator.de>)
        id 1a3Xul-000762-4M
        for github@konfusator.de; Tue, 01 Dec 2015 00:31:23 +0100
T To: test@home <github@konfusator.de>
F From: "Michael Fischer v. Mollard" <github@konfusator.de>
  Subject: Test
I Message-ID: <565CDC45.6020702@konfusator.de>
  Date: Tue, 1 Dec 2015 00:31:17 +0100
  User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
  MIME-Version: 1.0
  Content-Type: text/plain; charset=utf-8; format=flowed
  Content-Transfer-Encoding: 7bit


This is almost surely a regression – as I mentioned above https://github.com/mozilla-comm/jsmime/commit/4d830f6f894907758a239c8a53ae7c9483490380 introduced 

+      // Thought we were parsing an address, but it was a name.
+      ["name@example.com <receiver@example.com>",
+        [{name: "name@example.com", email: "receiver@example.com"}]],
+      ["name@huhu.com <receiver@example.com>",
+        [{name: "name@huhu.com", email: "receiver@example.com"}]],

as (AFAICS) positive test cases while these display names are invalid.
We'll fix it in bug 1359774.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.