send-email: rfc822 forbids using <address@domain> without a non-empty "phrase"
Email::Valid does respect this considering such a mailbox specification
invalid. b06c6bc831
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>
This commit is contained in:
parent
cabead982b
commit
155197e6e7
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user