From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,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.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 32CBB1F619 for ; Wed, 10 Aug 2022 07:40:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1660117231; bh=C0YAD+wJCqFBmuS0BH0sPk2871w3pCVUyNP6bFa9yQY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SbqEzVGPmfp8Gz4RVvlabaYgB55+mE9rcXM1x9meOL5FqaTeauBJtdUa5uLQhA87u kpHEzOcy2pnkt7xdytHJD7lhpnyYAe8Ej5sLUFgCfptQoOecKe2mV15RoEHwWKmzd8 Wvm/nyt0zVFlLi+99eIgUqMCC4VXHiOZwwr/zUdM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/3] www_text: add AUTH=ANONYMOUS to IMAP URLs Date: Wed, 10 Aug 2022 07:40:31 +0000 Message-Id: <20220810074031.19639-4-e@80x24.org> In-Reply-To: <20220810074031.19639-1-e@80x24.org> References: <20220810074031.19639-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: While the ';' requires escaping on the command-line, the presence of ";AUTH=ANONYMOUS" communicates clearly that anonymous access is supported in accordance to RFC 4505. --- lib/PublicInbox/WwwText.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm index 71b04561..c067369e 100644 --- a/lib/PublicInbox/WwwText.pm +++ b/lib/PublicInbox/WwwText.pm @@ -276,10 +276,12 @@ sub _add_non_http_urls ($$) { $ctx->{ibx}->can('nntp_url') or return; # TODO extindex can have IMAP my $urls = $ctx->{ibx}->imap_url($ctx); if (@$urls) { - $$txt .= "\nIMAP subfolder(s) are available under:"; - $$txt .= "\n " . join("\n ", @$urls); + $urls = join("\n ", @$urls); + $urls =~ s!://([^/@]+)/!://;AUTH=ANONYMOUS\@$1/!sg; $$txt .= <