diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-09-09 21:01:09 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-09-09 21:01:09 -0600 |
commit | 7feb75607413687c38c51197a73611cb30d39127 (patch) | |
tree | d8da4994dcd377360494775f5c1a666a30676e47 /imap/src/c-client/imap4r1.c | |
parent | 68ac2c9a0ed6d3b0aa1f14c1b5efc9a44e9d871f (diff) | |
download | alpine-7feb75607413687c38c51197a73611cb30d39127.tar.xz |
* Alpine will delete passwords that do not work from internal memory
and the local password cache (password file or system local cache.)
Diffstat (limited to 'imap/src/c-client/imap4r1.c')
-rw-r--r-- | imap/src/c-client/imap4r1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c index 155b4d5c..b29d7201 100644 --- a/imap/src/c-client/imap4r1.c +++ b/imap/src/c-client/imap4r1.c @@ -1206,6 +1206,7 @@ long imap_auth (MAILSTREAM *stream,NETMBX *mb,char *tmp,char *usr) sprintf (tmp,"Retrying using %s authentication after %.80s", at->name,lsterr); mm_log (tmp,NIL); + delete_password(mb, usr); fs_give ((void **) &lsterr); } trial = 0; /* initial trial count */ @@ -1215,6 +1216,7 @@ long imap_auth (MAILSTREAM *stream,NETMBX *mb,char *tmp,char *usr) sprintf (tmp,"Retrying %s authentication after %.80s",at->name,lsterr); mm_log (tmp,WARN); fs_give ((void **) &lsterr); + delete_password(mb, usr); } LOCAL->saslcancel = NIL; sprintf (tag,"%08lx",0xffffffff & (stream->gensym++)); @@ -1233,6 +1235,7 @@ 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 */ @@ -1250,6 +1253,7 @@ long imap_auth (MAILSTREAM *stream,NETMBX *mb,char *tmp,char *usr) } if (!trial) { /* if main program requested cancellation */ mm_log ("IMAP Authentication cancelled",ERROR); + delete_password(mb, usr); return NIL; } /* no error if protocol-initiated cancel */ @@ -1264,6 +1268,7 @@ 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); fs_give ((void **) &lsterr); } if(mb && *mb->auth){ @@ -1316,6 +1321,7 @@ long imap_login (MAILSTREAM *stream,NETMBX *mb,char *pwd,char *usr) if (imap_OK (stream,reply = imap_send (stream,"LOGIN",args))) ret = LONGT; /* success */ else { + delete_password(mb, usr); mm_log (reply->text,WARN); if (!LOCAL->referral && (trial == imap_maxlogintrials)) mm_log ("Too many login failures",ERROR); |