aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-01-06 23:06:29 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-01-06 23:06:29 +0000
commit494b8664dabf5abd0d1f0eb3995e92736f351dee (patch)
tree724dd941d0755eabb3cd3b43de750fbc82c83e7c /lib
parentd6bebd56f7d04c62892edc5d48cb89972de2cd5a (diff)
pop3.c: Fixed default authentication detection
Fixed an issue where a server may positively respond to the CAPA command but not list clear text as a valid authentication type.
Diffstat (limited to 'lib')
-rw-r--r--lib/pop3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index df199b00c..1f6126c11 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -588,9 +588,7 @@ static CURLcode pop3_state_capa_resp(struct connectdata *conn,
(void)instate; /* no use for this yet */
- if(pop3code != '+')
- result = pop3_state_user(conn);
- else {
+ if(pop3code == '+' && conn->proto.pop3c.authtypes) {
/* Check supported authentication types by decreasing order of security */
if(conn->proto.pop3c.authtypes & POP3_TYPE_SASL)
result = pop3_authenticate(conn);
@@ -605,6 +603,8 @@ static CURLcode pop3_state_capa_resp(struct connectdata *conn,
result = CURLE_LOGIN_DENIED; /* Other types not supported */
}
}
+ else
+ result = pop3_state_user(conn);
return result;
}