From: Eric Wong Date: Fri, 15 Nov 2024 02:59:32 +0000 (+0000) Subject: view: fix obfuscation in message/* attachments X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9744675cac27f2c4f40a59b77a87da7e1c3633c;p=thirdparty%2Fpublic-inbox.git view: fix obfuscation in message/* attachments Our address obfuscation currently relies on HTML-escaped output, so we need to call obfuscate_addrs() after ascii_html(). This bug only affected rare messages which include another message/* attachment. Without this fix it didn't fail to obfuscate, but rather showed the showed `•' in the HTML instead of the entity it represents. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index ad2592530..21cee63a7 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -592,8 +592,9 @@ sub submsg_hdr ($$) { for my $h (qw(From To Cc Subject Date Message-ID X-Alt-Message-ID)) { $s .= "$h: $_\n" for $eml->header($h); } + $s = ascii_html($s); obfuscate_addrs($ctx->{-obfs_ibx}, $s) if $ctx->{-obfs_ibx}; - ascii_html($s); + $s; } sub attach_link ($$$$;$) {