aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-02-09 17:17:02 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-02-09 17:17:02 +0000
commitfd52530b50baf8e1d21cb081a3a4bb9f25feeec1 (patch)
tree335f237d051b3aa32024a8fb671b5363eae5aee2 /lib
parent572f7864b27ba133b99e256c248dea6c93b0b7c7 (diff)
pop3: Fixed SASL authentication capability detection
Fixed the SASL capability detection to include the space character before the authentication mechanism list. Otherwise a capability such as SASLSOMETHING would be interpreted as enabling SASL and potentially trying to identify SOMETHING as a mechanism.
Diffstat (limited to 'lib')
-rw-r--r--lib/pop3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index a29b96f9f..8c2c9bb5a 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -269,12 +269,12 @@ static int pop3_endofresp(struct pingpong *pp, int *resp)
pop3c->authtypes |= POP3_TYPE_APOP;
/* Does the server support SASL based authentication? */
- else if(len >= 4 && !memcmp(line, "SASL", 4)) {
+ else if(len >= 5 && !memcmp(line, "SASL ", 5)) {
pop3c->authtypes |= POP3_TYPE_SASL;
/* Advance past the SASL keyword */
- line += 4;
- len -= 4;
+ line += 5;
+ len -= 5;
/* Loop through the data line */
for(;;) {