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

git format-patch --in-reply-to allows header injection. Intended?

From
NHNiklas Hambüchen <mail@nh2.me>
Date
Sep 4, 2014, 21:21 UTC
Message-ID
<5408D7ED.9010203@nh2.me>
Hi,

I just wanted to ask if the --in-reply-to flag of git format-patch is supposed to write the given string unmodified into the email or whether it ought to perform some check against header injection.

For example, if you pass "--in-reply-to=<msgid>\nTo: <other@example.com"
(notice lack of trailing `>`), then the generated email will actually
contain a
  To: <other@example.com>
header.

(Depending on your shell you might also use "--in-reply-to=`cat`" to get the above working more easily.)

Is this known and working as intended, or undesired?

Thanks! Niklas

Next: Junio C Hamano
Message 1 of 4 in “git format-patch --in-reply-to allows header injection. Intended?”
  1. Niklas HambüchenSep 4, 2014
  2. Junio C HamanoSep 4, 2014
  3. Niklas HambüchenSep 4, 2014
  4. Junio C HamanoSep 4, 2014

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.