summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44c1084)
raw | patch | inline | side by side (parent: 44c1084)
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | |
Wed, 23 Aug 2006 10:02:59 +0000 (03:02 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 23 Aug 2006 10:04:01 +0000 (03:04 -0700) |
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>
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>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index a83c7e90948fc3fe1b1ac82335704d66d060edab..746c525079317491e35827f331922e17e5fbd089 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
if ($2 eq $from) {
next if ($suppress_from);
}
- else {
+ elsif ($1 eq 'From') {
$author_not_sender = $2;
}
printf("(mbox) Adding cc: %s from line '%s'\n",