From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D4A751F4D7 for ; Fri, 15 Nov 2024 02:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1731639573; bh=9IrpLMKjuS4yPb1DOK2O2h3NzFOx0OLtj3If9/ZkFEc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=3t9RescgF/zEPxPBLXvwp76Aklmv4I4HMTQZISLbK8SIxOKw3v8c19FIvhwZKHC9V fVqwZWIXnqM/1aYaCcNmK8fXQ/TCnTMYpsnZS+D45xTSkdQYeMQ3tFJagFdyXtQrYk nF6MRjOJVDNTBJCU+ewSI/MewXclckTZW5wfZkeM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/6] view: fix obfuscation in message/* attachments Date: Fri, 15 Nov 2024 02:59:32 +0000 Message-ID: <20241115025932.1647240-7-e@80x24.org> In-Reply-To: <20241115025932.1647240-1-e@80x24.org> References: <20241115025932.1647240-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 ad259253..21cee63a 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 ($$$$;$) {