From 40e5221e67e620c84350331aa4f273bcd88d25de Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Fri, 26 Jun 2020 12:30:31 -0600 Subject: * When Alpine starts a PREAUTH connection, it might still ask the user to login. Reported by Frank Tobin. --- imap/src/c-client/imap4r1.c | 7 ++++--- pith/pine.hlp | 12 ++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c index 4991f85e..db3f1190 100644 --- a/imap/src/c-client/imap4r1.c +++ b/imap/src/c-client/imap4r1.c @@ -800,7 +800,7 @@ long imap_status (MAILSTREAM *stream,char *mbx,long flags) MAILSTREAM *imap_open (MAILSTREAM *stream) { - unsigned long i,j; + unsigned long i,j, preauthed; char *s,tmp[MAILTMPLEN],usr[MAILTMPLEN]; NETMBX mb; IMAPPARSEDREPLY *reply = NIL; @@ -891,8 +891,9 @@ MAILSTREAM *imap_open (MAILSTREAM *stream) return NIL; /* lost during greeting */ } + preauthed = !strcmp (reply->key,"PREAUTH"); /* STARTTLS is not allowed in PREAUTH state */ - if (LOCAL->netstream && !strcmp (reply->key,"PREAUTH")){ + if (LOCAL->netstream && preauthed){ sslstart_t stls = (sslstart_t) mail_parameters (NIL,GET_SSLSTART,NIL); if (!LOCAL->gotcapability) imap_capability (stream); if (LOCAL->netstream @@ -902,7 +903,7 @@ MAILSTREAM *imap_open (MAILSTREAM *stream) } } /* if connected and not preauthenticated */ - if (LOCAL->netstream && strcmp (reply->key,"PREAUTH")) { + if (LOCAL->netstream && !preauthed) { sslstart_t stls = (sslstart_t) mail_parameters (NIL,GET_SSLSTART,NIL); /* get server capabilities */ if (!LOCAL->gotcapability) imap_capability (stream); diff --git a/pith/pine.hlp b/pith/pine.hlp index 6940af81..5b24327f 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 457 2020-06-26 12:26:06 +Alpine Commit 458 2020-06-26 12:28:12 ============= h_news ================= @@ -202,7 +202,15 @@ problems you find with this release.

-Version 2.23 addresses bugs found in previous releases and has several +Bugs addressed: + +

+ +

+Version 2.23 has new additions and addresses bugs found in previous releases and has several additions as well.

Additions include: -- cgit v1.2.3-54-g00ecf