From 5f83592e6ad3a6b7d1824e339a083db1e391145d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 14 Aug 2016 10:21:10 +0000 Subject: www: do not double-clean Message-IDs from internal DBs Ensure we usually strip one level of '<>' from Message-IDs, since our internal SQLite, Xapian, and SHA-1 storage all assume that. Realistically, we screw up if somebody has '<<' or '>>', but those are screwed up mail clients and we can deal with it another time. Currently, this means some messages with '>>' in References or Message-Id are not handled correctly, yet, but we match the behavior of Mail::Thread in keeping the extra '>'. --- lib/PublicInbox/Feed.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 232a91c0..25fec10a 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -266,8 +266,7 @@ sub feed_entry { my $midurl = $feed_opts->{midurl}; my $header_obj = $mime->header_obj; - my $mid = $header_obj->header_raw('Message-ID'); - defined $mid or return; + my $mid = mid_clean($header_obj->header_raw('Message-ID')); $mid = PublicInbox::Hval->new_msgid($mid); my $href = $midurl . $mid->{href}. '/'; -- cgit v1.2.3-24-ge0c7