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

Re: git-send-email.perl defect: address missing trailing > accepted

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2009, 23:28 UTC
Message-ID
<7vy6n5k5l0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1256079633.2029.81.camel@Joe-Laptop.home>
Joe Perches <joe@perches.com> writes:
> It seems that the regex for address validation
> isn't very good and perhaps there could/should
> be a stronger validation done for each address
> entered.

The existing ones are actually already harmful. It would trigger on a valid addresses like this, wouldn't it?

    To: "Hamano, Jun" <gitster@pobox.com>
It is worse than that.

The "# Verify the user input" block is in a wrong place in the codepath. After @to goes through this bogus "verification" step, it then is given to expand_aliases(), which may expand to real addresses. And then they pass through sanitize_address() before getting used.

Three implications that come from this wrong code structure are:
 (1) The stricter checks you added on top of the existing bogus
     verification step may prevent @to to reach expand_aliases() step,
     even if the tokens in @to may expand to correct addresses by this
     expand_aliases() step if they were allowed to reach here;
 (2) The result from expand_aliases() is never checked.
 (3) The result from sanitize_address() is not checked either.
Previous: Joe Perches
Message 6 of 6 in “git-send-email.perl defect: address missing trailing > accepted”
  1. Joe PerchesOct 20, 2009
  2. Erik Faye-LundOct 20, 2009
  3. Joe PerchesOct 20, 2009
  4. Erik Faye-LundOct 20, 2009
  5. Joe PerchesOct 20, 2009
  6. Junio C HamanoOct 20, 2009

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.