fix LOGIN in non-SASL builds
specifically, if AuthMechs included more than just LOGIN (which would be the case for '*') and the server announced any AUTH= mechanism, we'd immediately error out upon seeing it, thus failing to actually try LOGIN.
This commit is contained in:
parent
815822d81c
commit
bc51d0206a
|
@ -1957,17 +1957,14 @@ imap_open_store_authenticate2( imap_store_t *ctx )
|
||||||
if (ctx->conn.ssl || !any)
|
if (ctx->conn.ssl || !any)
|
||||||
#endif
|
#endif
|
||||||
auth_login = 1;
|
auth_login = 1;
|
||||||
} else {
|
|
||||||
#ifdef HAVE_LIBSASL
|
#ifdef HAVE_LIBSASL
|
||||||
|
} else {
|
||||||
int len = strlen( cmech->string );
|
int len = strlen( cmech->string );
|
||||||
if (saslend + len + 2 > saslmechs + sizeof(saslmechs))
|
if (saslend + len + 2 > saslmechs + sizeof(saslmechs))
|
||||||
oob();
|
oob();
|
||||||
*saslend++ = ' ';
|
*saslend++ = ' ';
|
||||||
memcpy( saslend, cmech->string, len + 1 );
|
memcpy( saslend, cmech->string, len + 1 );
|
||||||
saslend += len;
|
saslend += len;
|
||||||
#else
|
|
||||||
error( "IMAP error: authentication mechanism %s is not supported\n", cmech->string );
|
|
||||||
goto bail;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user