Thread (9 messages) flat view 9 messages, 3 authors, 2016-11-04

Re: send-email garbled header with trailing doublequote in email

From: Jeff King <hidden>
Date: 2016-11-02 21:11:25

On Wed, Nov 02, 2016 at 09:27:09PM +0100, Andrea Arcangeli wrote:
send-email gets confused with one trailing " at the end of the
email. Details and how to reproduce below, it breaks also with
upstream git version 2.10.2.dirty.
I'm not quite sure what happened, and what you wanted to happen. In your
example:
FYI: apparently I hit a git bug in this submit... reproducible with
the below command:

git send-email -1 --to '"what ever" [off-list ref]"'
The "to" address is slightly bogus here because of the extra
double-quote. That gets turned into a slightly bogus rfc2822 header:
*snip*
Dry-OK. Log says:
To: "what ever" " <redacted>
Which is funny, but matches what we do with other addresses that are
invalid according to the rfc. E.g., there was a discussion recently on:

  Stable [off-list ref] [4.8+]

which has historically been converted to:

  "Stable [4.8+]" [off-list ref]

In fact, it is not even git that does this, but rather what
Mail::Address happens to output (though git has fallback routines if
that module isn't available that do the same thing).

But in either case, in my test, the actual email address is still
extracted correctly and fed to the MTA, so the mail is delivered.

So I'm not sure what you wanted to happen that didn't. Did you want
--dry-run to complain about the bogus address? Did the message not get
delivered for you? Something else?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help