summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-06-26 12:30:31 -0600
committerEduardo Chappa <chappa@washington.edu>2020-06-26 12:30:31 -0600
commit40e5221e67e620c84350331aa4f273bcd88d25de (patch)
tree3dd045a8316ef9024c389667b75010156077efc7
parentbf45b81b973d2290e9f9852b09fc700278598339 (diff)
downloadalpine-40e5221e67e620c84350331aa4f273bcd88d25de.tar.xz
* When Alpine starts a PREAUTH connection, it might still ask the user
to login. Reported by Frank Tobin.
-rw-r--r--imap/src/c-client/imap4r1.c7
-rw-r--r--pith/pine.hlp12
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 =================
<HTML>
<HEAD>
@@ -202,7 +202,15 @@ problems you find with this release.
</UL>
<P>
-Version 2.23 addresses bugs found in previous releases and has several
+Bugs addressed:
+
+<UL>
+<LI> When Alpine starts a PREAUTH connection, it might still ask the user
+to login. Reported by Frank Tobin.
+</UL>
+
+<P>
+Version 2.23 has new additions and addresses bugs found in previous releases and has several
additions as well.
<P> Additions include: