@matheusbsbs / matheus-bagliano / commits / 68d42c41ef
Fork 0

git-send-email: Don't set author_not_sender from Cc: lines

When an mbox-style patch contains a Cc: line in the header, git-send-email will check the address against the sender specified on the command line. If they don't match, sender_not_author will be set to the address obtained from the Cc line. When this happens, git-send-email inserts a From: line at the beginning of the message body with the address obtained from the Cc line in the header, and the sender might be accused of forging patch authors. This patch fixes this by only updating sender_not_author when processing From: lines, not when processing Cc: lines. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Haavard Skinnemoen committed Aug 23, 2006 at 03:02 UTC 68d42c41ef33cde500307660bb64a1c74f62711e
1 file changed +1 -1
git-send-email.perl
+1 -1
@@ -510,7 +510,7 @@ foreach my $t (@files) {
510 if ($2 eq $from) {
511 next if ($suppress_from);
512 }
513 - else {
513 + elsif ($1 eq 'From') {
514 $author_not_sender = $2;
515 }
516 printf("(mbox) Adding cc: %s from line '%s'\n",