From 094812e001c4e78ecc9ff69be6f6e4fe0448c3fd Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Mon, 11 May 2020 23:22:27 -0600 Subject: * When using single trip authenticators, still report we used them, even though we do not report the full command used. --- imap/src/c-client/imap4r1.c | 4 ++++ imap/src/c-client/pop3.c | 2 ++ imap/src/c-client/smtp.c | 2 ++ pith/pine.hlp | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c index 1b4241d..b2c685f 100644 --- a/imap/src/c-client/imap4r1.c +++ b/imap/src/c-client/imap4r1.c @@ -1179,11 +1179,14 @@ long imap_auth (MAILSTREAM *stream,NETMBX *mb,char *tmp,char *usr) base = (at->flags & AU_SINGLE) && LOCAL->cap.sasl_ir ? (char *) tmp : NIL; if (base || imap_soutr (stream,tmp)) { + /* report we tried this authenticator */ + if(base && stream && stream->debug) mm_dlog (base); /* hide client authentication responses */ if (!(at->flags & AU_SECURE)) LOCAL->sensitive = T; ok = (*at->client) (imap_challenge,imap_response,base,"imap",mb,stream, net_port(LOCAL->netstream),&trial,usr); LOCAL->sensitive = NIL; /* unhide */ + /* make sure have a response */ if (!(reply = &LOCAL->reply)->tag) reply = imap_fake (stream,tag, @@ -1335,6 +1338,7 @@ long imap_response (void *s,char *base,char *response,unsigned long size) } *u = '\0'; /* tie off string for mm_dlog() */ if (stream->debug) mail_dlog (t,LOCAL->sensitive); + /* append CRLF */ *u++ = '\015'; *u++ = '\012'; ret = net_sout (LOCAL->netstream,t,u - t); diff --git a/imap/src/c-client/pop3.c b/imap/src/c-client/pop3.c index b93ef8f..6f69a40 100644 --- a/imap/src/c-client/pop3.c +++ b/imap/src/c-client/pop3.c @@ -641,6 +641,8 @@ long pop3_auth (MAILSTREAM *stream,NETMBX *mb,char *pwd,char *usr) } else base = NIL; LOCAL->saslcancel = NIL; if ((at->flags & AU_SINGLE) || pop3_send (stream,"AUTH",at->name)) { + /* record that we are trying this authentication */ + if ((at->flags & AU_SINGLE) && stream && stream->debug) mm_dlog(base); /* hide client authentication responses */ if (!(at->flags & AU_SECURE)) LOCAL->sensitive = T; if ((*at->client) (pop3_challenge,pop3_response,base,"pop",mb,stream, diff --git a/imap/src/c-client/smtp.c b/imap/src/c-client/smtp.c index 30bfd29..002e410 100644 --- a/imap/src/c-client/smtp.c +++ b/imap/src/c-client/smtp.c @@ -318,6 +318,8 @@ long smtp_auth (SENDSTREAM *stream,NETMBX *mb,char *tmp) else base = NIL; stream->saslcancel = NIL; if ((at->flags & AU_SINGLE) || smtp_send (stream,"AUTH",at->name) == SMTPAUTHREADY) { + /* log what type of authentication we are about to try */ + if ((at->flags & AU_SINGLE) && stream && stream->debug) mm_dlog(base); /* hide client authentication responses */ if (!(at->flags & AU_SECURE)) stream->sensitive = T; if ((*at->client) (smtp_challenge,smtp_response,base,"smtp",mb,stream, diff --git a/pith/pine.hlp b/pith/pine.hlp index bdca07a..527a0e8 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 424 2020-05-10 13:47:03 +Alpine Commit 425 2020-05-11 23:22:23 ============= h_news ================= -- cgit v1.2.3-54-g00ecf