]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei export-kw: completion returns all Maildir+IMAP
authorEric Wong <e@80x24.org>
Fri, 22 Oct 2021 08:22:46 +0000 (08:22 +0000)
committerEric Wong <e@80x24.org>
Fri, 22 Oct 2021 19:07:38 +0000 (19:07 +0000)
It's theoretically possible an AUTH=ANONYMOUS login could be
writable and allowed to store flags for various people (e.g.
within a private network).

lib/PublicInbox/LeiExportKw.pm

index 12c8f4067e9e348b430ee3327add7b066c302593..5be9e51ff311c68e743d80480f9d12ef3d30c6e2 100644 (file)
@@ -128,7 +128,7 @@ sub _complete_export_kw {
        my $lms = $lei->lms or return ();
        my $match_cb = $lei->complete_url_prepare(\@argv);
        # filter-out read-only sources:
-       my @k = grep(!m!(?://;AUTH=ANONYMOUS\@|\A(?:nntps?|s?news)://)!,
+       my @k = grep(m!(?:maildir|imaps?):!,
                        $lms->folders($argv[-1] // undef, 1));
        my @m = map { $match_cb->($_) } @k;
        @m ? @m : @k;