diff options
author | Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> | 2007-08-09 15:27:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-10 01:00:51 -0700 |
commit | 155197e6e770599a5ed7a33a33f2916032184dd3 (patch) | |
tree | b0298d2965f664839b439245eace652780ee0679 | |
parent | cabead982b7cf40f8930e6e38327fc396b7fef81 (diff) | |
download | git-155197e6e770599a5ed7a33a33f2916032184dd3.tar.gz git-155197e6e770599a5ed7a33a33f2916032184dd3.tar.xz |
send-email: rfc822 forbids using <address@domain> without a non-empty "phrase"
Email::Valid does respect this considering such a mailbox specification
invalid. b06c6bc831cbb9e9eb82fd3ffd5a2b674cd940d0 addressed the issue, but
only if Email::Valid is available.
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | 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 39e433b76..a02ab9694 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -408,8 +408,8 @@ sub extract_valid_address { # check for a local address: return $address if ($address =~ /^($local_part_regexp)$/); + $address =~ s/^\s*<(.*)>\s*$/$1/; if ($have_email_valid) { - $address =~ s/^\s*<(.*)>\s*$/$1/; return scalar Email::Valid->address($address); } else { # less robust/correct than the monster regexp in Email::Valid, |