DORMANTno replies

[PATCH] git-send-email: fix handling of special characters

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2016-06-15 22:57:25
Subsystem: the rest · Maintainer: Linus Torvalds

When patch sender's name has special characters,
git send-email did not quote it before matching
against the author name.
As a result it would produce mail like this:

	Date: Thu, 23 May 2013 16:36:00 +0300
	From: "Michael S. Tsirkin" [off-list ref]
	To: qemu-devel@nongnu.org
	Cc: "Michael S. Tsirkin" [off-list ref]
	Subject: [PATCH 0/9] virtio: switch to linux headers
	Message-Id: [off-list ref]

	From: "Michael S. Tsirkin" [off-list ref]

Fix by sanitizing before matching to patch author name.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 git-send-email.perl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index bd13cc8..c4dc438 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1400,7 +1400,8 @@ foreach my $t (@files) {
 		$subject = quote_subject($subject, $auto_8bit_encoding);
 	}
 
-	if (defined $author and $author ne $sender) {
+	my $sanitized_sender = sanitize_address($sender);
+	if (defined $author and $author ne $sanitized_sender) {
 		$message = "From: $author\n\n$message";
 		if (defined $author_encoding) {
 			if ($has_content_type) {
-- 
MST
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help