summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-10-10 11:00:30 -0600
committerEduardo Chappa <chappa@washington.edu>2021-10-10 11:00:30 -0600
commit9b2bd07cf27037177bb76d699cd29c03b6b6c20c (patch)
treeebd21bfb2fa0617cdc40ab55469ba045b9972ff7
parente65d2f50fb1098212999d1b4d46a40fb338de914 (diff)
downloadalpine-9b2bd07cf27037177bb76d699cd29c03b6b6c20c.tar.xz
* Alpine might delete all passwords from the password file if the
password file is not unlocked by cancellation, or the authentication for an XOAUTH2 server is cancelled, or the password of an account is changed.
-rw-r--r--alpine/imap.c3
-rw-r--r--alpine/mailcmd.c5
-rw-r--r--imap/src/c-client/imap4r1.c1
-rw-r--r--pith/imap.c6
-rw-r--r--pith/pine.hlp7
5 files changed, 16 insertions, 6 deletions
diff --git a/alpine/imap.c b/alpine/imap.c
index 6b125e66..5b2a1f74 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -612,7 +612,8 @@ oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, int *
sargs.help.title = _("HELP FOR SETTING UP XOAUTH2");
do {
- scrolltool(&sargs);
+ if(scrolltool(&sargs) == MC_NO)
+ ps_global->user_says_cancel = 1;
ps_global->mangled_screen = 1;
ps_global->painted_body_on_startup = 0;
ps_global->painted_footer_on_startup = 0;
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 128f813a..19c42742 100644
--- a/alpine/mailcmd.c
+++ b/alpine/mailcmd.c
@@ -363,11 +363,14 @@ int
alpine_get_password(char *prompt, char *pass, size_t len)
{
int flags = F_ON(F_QUELL_ASTERISKS, ps_global) ? OE_PASSWD_NOAST : OE_PASSWD;
+ int rv;
flags |= OE_DISALLOW_HELP;
pass[0] = '\0';
- return optionally_enter(pass,
+ rv = optionally_enter(pass,
-(ps_global->ttyo ? FOOTER_ROWS(ps_global) : 3),
0, len, prompt, NULL, NO_HELP, &flags);
+ if(rv == 1) ps_global->user_says_cancel = 1;
+ return rv;
}
int
diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c
index 85f3b2fc..9ee4b62e 100644
--- a/imap/src/c-client/imap4r1.c
+++ b/imap/src/c-client/imap4r1.c
@@ -1235,7 +1235,6 @@ long imap_auth (MAILSTREAM *stream,NETMBX *mb,char *tmp,char *usr)
if(base && !trial){ /* do it now, instead of later */
mm_log ("IMAP Authentication cancelled",ERROR);
- delete_password(mb, usr);
return NIL;
}
/* make sure have a response */
diff --git a/pith/imap.c b/pith/imap.c
index cde97ccf..4889a61e 100644
--- a/pith/imap.c
+++ b/pith/imap.c
@@ -1157,7 +1157,7 @@ void
imap_delete_passwd_auth(MMLOGIN_S **m_list, char *user,
STRLIST_S *hostlist, int altflag, char *authtype)
{
- MMLOGIN_S *l, *p;
+ MMLOGIN_S *l, *p, *q;
int len, offset;
if(m_list == NULL || *m_list == NULL) return;
@@ -1186,8 +1186,9 @@ imap_delete_passwd_auth(MMLOGIN_S **m_list, char *user,
/* relink *mlist */
if(p == *m_list)
- *m_list = (*m_list)->next;
+ q = (*m_list)->next;
else{
+ q = *m_list;
for(l = *m_list; l && l->next != p; l = l->next);
l->next = p->next;
}
@@ -1201,6 +1202,7 @@ imap_delete_passwd_auth(MMLOGIN_S **m_list, char *user,
free_strlist(&p->hosts);
fs_give((void **) &p);
+ *m_list = q;
dprint((9, "imap_delete_password: done with deletion."));
}
diff --git a/pith/pine.hlp b/pith/pine.hlp
index d3858b9e..0ef97809 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 602 2021-10-08 21:42:40
+Alpine Commit 603 2021-10-10 11:00:24
============= h_news =================
<HTML>
<HEAD>
@@ -206,6 +206,11 @@ Bugs addressed include:
<UL>
<LI> Alpine crashes when it cannot retrieve the privacy policy due to
failure connecting to the external server.
+
+<LI> Alpine might delete all passwords from the password file if the
+ password file is not unlocked by cancellation, or the authentication
+ for an XOAUTH2 server is cancelled, or the password of an account
+ is changed.
</UL>
<P>Version 2.25 adds new features and addresses bugs found in previous