summaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-12-24 22:35:55 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-12-24 22:49:36 +0000
commit0c762f1c92505b1d749f36388ff98406ff07dea0 (patch)
tree2a7462a68c15295cd239024a4c537ed16f2efe2a /lib/pop3.c
parent15bf9389ce348da0e69ba01fbfdabcf74a3b7523 (diff)
downloadcurl-0c762f1c92505b1d749f36388ff98406ff07dea0.tar.gz
pop3: Fixed auth preference not being honored when CAPA not supported
If a user indicated they preferred to authenticate using APOP or a SASL mechanism, but neither were supported by the server, curl would always fall back to clear text when CAPA wasn't supported, even though the user didn't want to use this. This also fixes the auto build failure caused by commit 6f2d5f0562f64a.
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 5ea50e369..2716cec65 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -780,8 +780,12 @@ static CURLcode pop3_state_capa_resp(struct connectdata *conn, int pop3code,
else
result = pop3_perform_authentication(conn);
}
- else
- result = pop3_perform_user(conn);
+ else {
+ /* Clear text is supported when CAPA isn't recognised */
+ pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
+
+ result = pop3_perform_authentication(conn);
+ }
return result;
}