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, T_SCC_BODY_TEXT_LINE 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 5F2111F461 for ; Tue, 28 Nov 2023 17:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1701193022; bh=ASEBMA6VIZxN8ANHIJOUeyUzV2pvqMnbnAqrPv4Eb2E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bu9wfy7SvxzmJA397IQWIg1flWcjOv2t1ihnJVsMnUtBtktqBbENtQ4gWK9As6d29 w1LHRGHi/4RpLODUGngVtxGBtpzKHwEwqTecUQpqsCbF3B1nGvj4TzD1ZDr3pXQKEX ovBEmvmE15K3XjuhAqhZ4a+T+m0ITDYYnGdbLac0= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/4] www: mail_diff: fix optional address obfuscation Date: Tue, 28 Nov 2023 17:36:59 +0000 Message-ID: <20231128173701.1472101-3-e@80x24.org> In-Reply-To: <20231128173701.1472101-1-e@80x24.org> References: <20231128173701.1472101-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We need to load the proper package and fully-qualify the sub call since we shouldn't load Hval in lei. Some users use this feature even if its broken, oh well :< --- lib/PublicInbox/MailDiff.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/MailDiff.pm b/lib/PublicInbox/MailDiff.pm index b1c12d6d..98284b23 100644 --- a/lib/PublicInbox/MailDiff.pm +++ b/lib/PublicInbox/MailDiff.pm @@ -47,6 +47,8 @@ sub prep_a ($$) { dump_eml($self, "$self->{tmp}/a", $eml); } +# WWW-specific stuff below (TODO: split out for non-lei) + sub next_smsg ($) { my ($self) = @_; my $ctx = $self->{ctx}; @@ -62,9 +64,12 @@ sub next_smsg ($) { sub emit_msg_diff { my ($bref, $self) = @_; # bref is `git diff' output + require PublicInbox::Hval; + # will be escaped to `•' in HTML $self->{ctx}->{ibx}->{obfuscate} and - obfuscate_addrs($self->{ctx}->{ibx}, $$bref, "\x{2022}"); + PublicInbox::Hval::obfuscate_addrs($self->{ctx}->{ibx}, + $$bref, "\x{2022}"); print { $self->{ctx}->{zfh} } '
' if $self->{nr} > 1;
 	flush_diff($self->{ctx}, $bref);
 	next_smsg($self);