From a51842db6be99f7888266a131c1516cbfb0f5377 Mon Sep 17 00:00:00 2001 From: Viktor Gedzenko Date: Tue, 29 Aug 2017 23:09:23 +0300 Subject: Fixed fake 'Auth Error' on iCloud when service responses with 'BAD [UNAVAILABLE] Service temporarily unavailable' (#1642) --- src/core/imap/MCIMAPSession.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp index 4d23da60..bca57003 100644 --- a/src/core/imap/MCIMAPSession.cpp +++ b/src/core/imap/MCIMAPSession.cpp @@ -949,6 +949,10 @@ void IMAPSession::login(ErrorCode * pError) else if (response->locationOfString(MCSTR("Login to your account via a web browser")) != -1) { * pError = ErrorOutlookLoginViaWebBrowser; } + else if (response->locationOfString(MCSTR("Service temporarily unavailable")) != -1) { + mShouldDisconnect = true; + * pError = ErrorConnection; + } else { * pError = ErrorAuthentication; } -- cgit v1.2.3