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

[PATCH] send-email: add extra safetly in address sanitazion

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 4, 2012, 15:10 UTC
Message-ID
<1328368255-10591-1-git-send-email-felipe.contreras@gmail.com>
Otherwise, 'git send-email' would be happy to do:
 % git send-email --to '<foo@bar.com>>'
And use '<foo@bar.com>>' in the headers.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 git-send-email.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index ef30c55..b8bf014 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -889,7 +889,7 @@ sub is_rfc2047_quoted {
 # use the simplest quoting being able to handle the recipient
 sub sanitize_address {
 	my ($recipient) = @_;
-	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)\s*(<.*)/);
+	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)\s*(<.*?>)/);
 
 	if (not $recipient_name) {
 		return $recipient;
-- 
1.7.9
Next: Felipe Contreras
Message 1 of 4 in “send-email: add extra safetly in address sanitazion”
  1. send-email: add extra safetly in address sanitazionFelipe Contreras, Feb 4, 2012
  2. Felipe ContrerasFeb 4, 2012
  3. Junio C HamanoFeb 5, 2012
  4. Felipe ContrerasFeb 5, 2012

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.