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