diff options
author | 2015-06-13 18:08:20 +0700 | |
---|---|---|
committer | 2015-06-13 18:08:20 +0700 | |
commit | 060f12e1f0b831e56a4bb590753a8fb98bf51030 (patch) | |
tree | 170237da23f2b99747bfb9a106a674c83a808106 /src | |
parent | 0db4d50ff3d4697a07b638b183a11fb27c293226 (diff) |
Don't login when OAuthToken is NULL
Diffstat (limited to 'src')
-rwxr-xr-x | src/core/imap/MCIMAPSession.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp index d070b853..aac11310 100755 --- a/src/core/imap/MCIMAPSession.cpp +++ b/src/core/imap/MCIMAPSession.cpp @@ -793,7 +793,12 @@ void IMAPSession::login(ErrorCode * pError) case AuthTypeXOAuth2: case AuthTypeXOAuth2Outlook: - r = mailimap_oauth2_authenticate(mImap, utf8username, MCUTF8(mOAuth2Token)); + if (mOAuth2Token == NULL) { + r = MAILIMAP_ERROR_STREAM; + } + else { + r = mailimap_oauth2_authenticate(mImap, utf8username, MCUTF8(mOAuth2Token)); + } break; } if (r == MAILIMAP_ERROR_STREAM) { |