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.
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(;;) {