git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Nov 2, 2016, 21:11 UTC
Message-ID
<20161102211118.sc4j3fezfqxg23i3@sigill.intra.peff.net>
In-Reply-To
<20161102202709.GI4611@redhat.com>
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" <--your--@--email--.com>"'

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" " <--your--@--email--.com>

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 <stable@vger.kernel.org> [4.8+]
which has historically been converted to:
  "Stable [4.8+]" <stable@vger.kernel.org>

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
Previous: Andrea ArcangeliNext: Andrea Arcangeli
Message 2 of 9 in “send-email garbled header with trailing doublequote in email”
  1. Andrea ArcangeliNov 2, 2016
  2. Jeff KingNov 2, 2016
  3. Andrea ArcangeliNov 2, 2016
  4. Jeff KingNov 2, 2016
  5. Andrea ArcangeliNov 2, 2016
  6. Jeff KingNov 3, 2016
  7. demerphqNov 3, 2016
  8. Andrea ArcangeliNov 4, 2016
  9. Jeff KingNov 4, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.