aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-04-25 19:37:20 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-25 21:11:58 -0700
commitc38f0247a88f2c54c0c8535d645f33140201522f (patch)
tree9b44df2221c3bdc4f410015ba9cf2f120750dc49
parent732263d411fe2e3e29ee9fa1c2ad1a20bdea062c (diff)
downloadgit-c38f0247a88f2c54c0c8535d645f33140201522f.tar.gz
git-c38f0247a88f2c54c0c8535d645f33140201522f.tar.xz
Validate @recipients before using it for sendmail and Net::SMTP.
Ensure that @recipients is only raw addresses when it is handed to the sendmail binary OR Net::SMTP, otherwise BCC cases might get an extra <, or wierd stuff might be passed to the exec. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-send-email.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index e4fe8965b..b60229290 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -449,6 +449,7 @@ sub send_message
@cc = (map { sanitize_address_rfc822($_) } @cc);
my $to = join (",\n\t", @recipients);
@recipients = unique_email_list(@recipients,@cc,@bcclist);
+ @recipients = (map { extract_valid_address($_) } @recipients);
my $date = format_2822_time($time++);
my $gitversion = '@@GIT_VERSION@@';
if ($gitversion =~ m/..GIT_VERSION../) {
@@ -474,7 +475,7 @@ X-Mailer: git-send-email $gitversion
$header .= join("\n", @xh) . "\n";
}
- my @sendmail_parameters = ('-i', map { extract_valid_address($_) } @recipients);
+ my @sendmail_parameters = ('-i', @recipients);
if ($dry_run) {
# We don't want to send the email.