about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-18 23:22:25 +0300
committerEric Wong <e@80x24.org>2021-02-18 20:02:22 -0400
commit725fd624277364402a86262486cdb79458db4ed8 (patch)
treea02f8f35b1419f6f8897bd7ec452d79356d330bd /lib
parentd972b6711b01500181f809ef54a08aa29cb0d4a4 (diff)
downloadpublic-inbox-725fd624277364402a86262486cdb79458db4ed8.tar.gz
We need to ensure authentication failures and error codes get
propagated to the parent process(es) properly.

v2: update MANIFEST
v3: LeiAuth.pm ->_lei_cfg bit moved to a previous commit
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/NetReader.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index ad8c18d0..61ea538b 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -89,6 +89,9 @@ sub mic_for { # mic = Mail::IMAPClient
                 $self->{mic_arg}->{uri_section($uri)} = $mic_arg;
         } else {
                 $err = "E: <$url> LOGIN: $@\n";
+                if ($cred && defined($cred->{password})) {
+                        $err =~ s/\Q$cred->{password}\E/*******/g;
+                }
                 $mic = undef;
         }
         $cred->run($mic ? 'approve' : 'reject') if $cred;