From: Erik Faye-Lund Date: Tue, 20 Oct 2009 22:29:55 GMT Subject: Re: git-send-email.perl defect: address missing trailing > accepted 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 wrote: > I typo cut/pasted an invalid email address, > neglecting to copy the trailing ">". > > was:    "Name needed: "Name " > > 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