From: "Michael S. Tsirkin" <mst@redhat.com>
To: git@vger.kernel.org
Subject: [PATCH] git-send-email: fix handling of special characters
Date: Thu, 23 May 2013 16:54:18 +0300 [thread overview]
Message-ID: <20130523135418.GA20741@redhat.com> (raw)
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" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH 0/9] virtio: switch to linux headers
Message-Id: <1369316169-20181-1-git-send-email-mst@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
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
next reply other threads:[~2013-05-23 13:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 13:54 Michael S. Tsirkin [this message]
2013-05-23 19:52 ` [PATCH] git-send-email: fix handling of special characters Junio C Hamano
2013-05-23 19:56 ` Junio C Hamano
2013-05-23 21:19 ` Michael S. Tsirkin
2013-05-23 21:27 ` Junio C Hamano
2013-05-23 21:38 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130523135418.GA20741@redhat.com \
--to=mst@redhat.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).