summaryrefslogtreecommitdiff
path: root/imap/src
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-09-01 12:24:16 -0600
committerEduardo Chappa <chappa@washington.edu>2019-09-01 12:24:16 -0600
commit6076d5da019c37df48fb626d1b46bf242361388b (patch)
treeae414dc367b61619ce7e4ffcc1b6e4c24b1d4488 /imap/src
parent418e8bc5789d9ef223f043848619b6a648748dcc (diff)
downloadalpine-6076d5da019c37df48fb626d1b46bf242361388b.tar.xz
* Improvements to documentation and behavior of Alpine when users get a
non-empty challenge in a smtp server.
Diffstat (limited to 'imap/src')
-rw-r--r--imap/src/c-client/smtp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/imap/src/c-client/smtp.c b/imap/src/c-client/smtp.c
index a01c87b4..c79d9cfb 100644
--- a/imap/src/c-client/smtp.c
+++ b/imap/src/c-client/smtp.c
@@ -357,13 +357,14 @@ void *smtp_challenge (void *s,unsigned long *len)
char tmp[MAILTMPLEN];
void *ret = NIL;
SENDSTREAM *stream = (SENDSTREAM *) s;
- if ((stream->replycode == SMTPAUTHREADY) &&
- !(ret = rfc822_base64 ((unsigned char *) stream->reply + 4,
+ if (stream->replycode == SMTPAUTHREADY){
+ if(!(ret = rfc822_base64 ((unsigned char *) stream->reply + 4,
strlen (stream->reply + 4),len))) {
- sprintf (tmp,"SMTP SERVER BUG (invalid challenge, continuing): %.80s",stream->reply+4);
- mm_log (tmp,ERROR);
- ret = cpystr(""); /* This is silly: fake a reply, it will be ignored */
- *len = 0L;
+ sprintf (tmp,"SMTP SERVER BUG (invalid challenge, continuing): %.80s",stream->reply+4);
+ mm_log (tmp,ERROR);
+ ret = cpystr(""); /* This is silly: fake a reply, it will be ignored */
+ }
+ *len = 0L; /* This is even sillier, fake challenge is empty... */
}
return ret;
}