Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

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

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:47:35
Subsystem: the rest · Maintainer: Linus Torvalds

On Wed, Oct 21, 2009 at 12:12 AM, Joe Perches [off-list ref] wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help