From 9c93edcdefb01f193aced818142b050aeffc04e1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 20 Aug 2015 08:54:32 +0000 Subject: avoid using header_raw for Message-ID retrieval This is for consistency with ssoma. I doubt it makes a difference in practice, but in case somebody decides any of the Message-ID-containing headers should have strange characters, we'll decode and attempt to thread them. This isn't an attack vector, just a way to make messages thread improperly which is pointless... --- lib/PublicInbox/Feed.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 2e352cba..bbf50615 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -254,7 +254,7 @@ sub add_to_feed { my $fullurl = $feed_opts->{fullurl} || 'http://example.com/f/'; my $header_obj = $mime->header_obj; - my $mid = $header_obj->header_raw('Message-ID'); + my $mid = $header_obj->header('Message-ID'); defined $mid or return 0; $mid = PublicInbox::Hval->new_msgid($mid); my $href = $mid->as_href . '.html'; @@ -318,7 +318,7 @@ sub add_topic { my $mime = do_cat_mail($git, $path) or return 0; $header_obj = $mime->header_obj; } - my $mid = $header_obj->header_raw('Message-ID'); + my $mid = $header_obj->header('Message-ID'); $mid = mid_compressed(mid_clean($mid)); $u = $enc_utf8->decode($u); push @$order, [ $mid, $ts, $u, $subj ]; -- cgit v1.2.3-24-ge0c7