From 03255d56a53d390a7f7bb069e0f1c6ea5d34756c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 26 Feb 2020 10:21:12 +0000 Subject: import: drop '<' and '>' characters in addresses Some strange "From:" lines will cause Email::Address::XS to leave '<' (and presumably '>') in the address which git-fast-import won't accept even if quoted. Workaround this problem by deleting '<' and '>' the same way we delete them for the ident name. Reported-by: Leah Neukirchen Link: https://public-inbox.org/meta/87h7zfemur.fsf@vuxu.org/ --- t/import.t | 2 ++ 1 file changed, 2 insertions(+) (limited to 't') diff --git a/t/import.t b/t/import.t index e71dd714..b88d308e 100644 --- a/t/import.t +++ b/t/import.t @@ -55,6 +55,8 @@ $im->done; my @revs = $git->qx(qw(rev-list HEAD)); is(scalar @revs, 1, 'one revision created'); +my $odd = '"=?iso-8859-1?Q?J_K=FCpper?= header_set('From', $odd); $mime->header_set('Message-ID', ''); $mime->header_set('Subject', 'msg2'); like($im->add($mime, sub { $mime }), qr/\A:\d+\z/, 'added 2nd message'); -- cgit v1.2.3-24-ge0c7