From cabf16e5f9e138d77e2800d753c7ce7c46a18104 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 12 Sep 2021 22:15:34 -0600 Subject: * Additional code so that passwords are not deleted when connections are lost. --- imap/src/c-client/imap4r1.c | 3 ++- imap/src/c-client/nntp.c | 3 ++- imap/src/c-client/pop3.c | 3 ++- imap/src/c-client/smtp.c | 3 ++- pith/pine.hlp | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c index b29d7201..85f3b2fc 100644 --- a/imap/src/c-client/imap4r1.c +++ b/imap/src/c-client/imap4r1.c @@ -1268,7 +1268,8 @@ long imap_auth (MAILSTREAM *stream,NETMBX *mb,char *tmp,char *usr) sprintf (tmp,"Can not authenticate to IMAP server: %.80s",lsterr); mm_log (tmp,ERROR); } - delete_password(mb, usr); + if(LOCAL->netstream && !LOCAL->byeseen) + delete_password(mb, usr); fs_give ((void **) &lsterr); } if(mb && *mb->auth){ diff --git a/imap/src/c-client/nntp.c b/imap/src/c-client/nntp.c index 3875b351..b44087ca 100644 --- a/imap/src/c-client/nntp.c +++ b/imap/src/c-client/nntp.c @@ -2098,7 +2098,8 @@ long nntp_send_auth_work (SENDSTREAM *stream,NETMBX *mb,char *pwd,long flags) sprintf (tmp,"Can not authenticate to NNTP server: %.80s",lsterr); mm_log (tmp,ERROR); } - delete_password(mb, mb ? mb->user : NULL); + if(!ret && stream->netstream) + delete_password(mb, mb ? mb->user : NULL); fs_give ((void **) &lsterr); } else if (mb->secflag) /* no SASL, can't do /secure */ diff --git a/imap/src/c-client/pop3.c b/imap/src/c-client/pop3.c index ea8a64f5..d982744c 100644 --- a/imap/src/c-client/pop3.c +++ b/imap/src/c-client/pop3.c @@ -666,7 +666,8 @@ long pop3_auth (MAILSTREAM *stream,NETMBX *mb,char *pwd,char *usr) sprintf (pwd,"Can not authenticate to POP3 server: %.80s",t); mm_log (pwd,ERROR); } - delete_password(mb, usr); + if(LOCAL->netstream && !ret) + delete_password(mb, usr); fs_give ((void **) &t); } if(mb && *mb->auth){ diff --git a/imap/src/c-client/smtp.c b/imap/src/c-client/smtp.c index 7c1f9936..ee225477 100644 --- a/imap/src/c-client/smtp.c +++ b/imap/src/c-client/smtp.c @@ -345,7 +345,8 @@ long smtp_auth (SENDSTREAM *stream,NETMBX *mb,char *tmp) sprintf (tmp,"Can not authenticate to SMTP server: %.80s",lsterr); mm_log (tmp,ERROR); } - delete_password(mb, usr); + if(!ret && stream->netstream) + delete_password(mb, usr); fs_give ((void **) &lsterr); } if(mb && *mb->auth){ diff --git a/pith/pine.hlp b/pith/pine.hlp index 001f706e..a1b2df41 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 589 2021-09-12 14:13:21 +Alpine Commit 590 2021-09-12 22:15:30 ============= h_news ================= -- cgit v1.2.3-54-g00ecf