Update Imap.ClientSession now IMAP NO commands aren't treated as errors

Check the response code when logging in for the command, and handle as
appropriate.
This commit is contained in:
Michael Gratton 2019-04-01 02:01:04 +11:00
parent d6e19352f9
commit 71d8c8b1a4
2 changed files with 39 additions and 18 deletions

View file

@ -62,6 +62,12 @@ class Integration.Imap.ClientSession : TestCase {
assert_not_reached();
} catch (Geary.ImapError.UNAUTHENTICATED err) {
// All good
} catch (Geary.ImapError.SERVER_ERROR err) {
// Some servers (Y!) return AUTHORIZATIONFAILED response
// code if the login (not password) is bad
if (!("AUTHORIZATIONFAILED" in err.message)) {
throw err;
}
}
}