summaryrefslogtreecommitdiff
path: root/imap
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-05-11 23:22:27 -0600
committerEduardo Chappa <chappa@washington.edu>2020-05-11 23:22:27 -0600
commit094812e001c4e78ecc9ff69be6f6e4fe0448c3fd (patch)
tree409dda1e236d86132fcca6abb6abba244c28e270 /imap
parentc0431b87ab14cf4bd501b33353f90db51bdafd73 (diff)
downloadalpine-094812e001c4e78ecc9ff69be6f6e4fe0448c3fd.tar.xz
* When using single trip authenticators, still report we used them,
even though we do not report the full command used.
Diffstat (limited to 'imap')
-rw-r--r--imap/src/c-client/imap4r1.c4
-rw-r--r--imap/src/c-client/pop3.c2
-rw-r--r--imap/src/c-client/smtp.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c
index 1b4241da..b2c685fb 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 b93ef8fb..6f69a400 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 30bfd293..002e4107 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,