From bc51d0206aa72c97f79b21a00173edb059c610dd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 3 Dec 2016 14:32:51 +0100 Subject: [PATCH] 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. --- src/drv_imap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index 4051ec6..4bc2fcc 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -1957,17 +1957,14 @@ imap_open_store_authenticate2( imap_store_t *ctx ) if (ctx->conn.ssl || !any) #endif auth_login = 1; - } else { #ifdef HAVE_LIBSASL + } else { int len = strlen( cmech->string ); if (saslend + len + 2 > saslmechs + sizeof(saslmechs)) oob(); *saslend++ = ' '; memcpy( saslend, cmech->string, len + 1 ); saslend += len; -#else - error( "IMAP error: authentication mechanism %s is not supported\n", cmech->string ); - goto bail; #endif } }