1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 14:35:03 -05:00

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.
This commit is contained in:
Steve Holme 2013-02-09 17:17:02 +00:00
parent 572f7864b2
commit fd52530b50

View File

@ -269,12 +269,12 @@ static int pop3_endofresp(struct pingpong *pp, int *resp)
pop3c->authtypes |= POP3_TYPE_APOP; pop3c->authtypes |= POP3_TYPE_APOP;
/* Does the server support SASL based authentication? */ /* 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; pop3c->authtypes |= POP3_TYPE_SASL;
/* Advance past the SASL keyword */ /* Advance past the SASL keyword */
line += 4; line += 5;
len -= 4; len -= 5;
/* Loop through the data line */ /* Loop through the data line */
for(;;) { for(;;) {