From f9744675cac27f2c4f40a59b77a87da7e1c3633c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 15 Nov 2024 02:59:32 +0000 Subject: [PATCH] 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. --- lib/PublicInbox/View.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ($$$$;$) { -- 2.47.2