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

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

From
Erik Faye-Lund <kusmabite@googlemail.com>
Date
Oct 20, 2009, 22:29 UTC
Message-ID
<40aa078e0910201529m338ef3d1o4fa1a31c3dcc2a20@mail.gmail.com>
In-Reply-To
<1256076767.2029.59.camel@Joe-Laptop.home>
On Wed, Oct 21, 2009 at 12:12 AM, Joe Perches <joe@perches.com> wrote:
Show 9 quoted lines
> I typo cut/pasted an invalid email address,
> neglecting to copy the trailing ">".
>
> was:    "Name <addr.org"
> needed: "Name <addr.org>"
>
> Anyone have suggestions on how to get
> git-send-email.perl to notify and abort
> sending on more invalid address styles?

Something along these lines? Of course, the error message is, uhm, less than helpful :)

--->8---
diff --git a/git-send-email.perl b/git-send-email.perl
index f5ba4e7..83f5e80 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -787,6 +787,10 @@ sub is_rfc2047_quoted {
 sub sanitize_address
 {
 	my ($recipient) = @_;
+	if ($recipient =~ m/.*<[^>]*$/) {
+		die "EEK!"
+	}
+
 	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)\s*(<.*)/);

 	if (not $recipient_name) {
-- 
Erik "kusma" Faye-Lund
Previous: Joe PerchesNext: Joe Perches
Message 2 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.