diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2021-12-02 00:34:27 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2021-12-02 15:24:03 -0500 |
commit | 8b2a3caa9e71f31e0e1730625e359b503d893a5a (patch) | |
tree | b24dbfed14095bd018ed19d37f75c0ddee2deca1 /nonprism/claws-mail/0001_move_OAuth2_to_last_place_in_auto_auth_selection.diff | |
parent | 6ccbb9fada87a5a9cf07c8e8542049f167696239 (diff) | |
download | abslibre-8b2a3caa9e71f31e0e1730625e359b503d893a5a.tar.gz abslibre-8b2a3caa9e71f31e0e1730625e359b503d893a5a.tar.bz2 abslibre-8b2a3caa9e71f31e0e1730625e359b503d893a5a.zip |
[claws-mail]: upgrade to v4.0.0
Diffstat (limited to 'nonprism/claws-mail/0001_move_OAuth2_to_last_place_in_auto_auth_selection.diff')
-rw-r--r-- | nonprism/claws-mail/0001_move_OAuth2_to_last_place_in_auto_auth_selection.diff | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/nonprism/claws-mail/0001_move_OAuth2_to_last_place_in_auto_auth_selection.diff b/nonprism/claws-mail/0001_move_OAuth2_to_last_place_in_auto_auth_selection.diff new file mode 100644 index 000000000..472536849 --- /dev/null +++ b/nonprism/claws-mail/0001_move_OAuth2_to_last_place_in_auto_auth_selection.diff @@ -0,0 +1,43 @@ +From: paul <paul@claws-mail.org> +Date: Mon, 12 Jul 2021 09:08:33 +0000 (+0100) +Subject: move OAuth2 to last place in auto auth selection +X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=9c2585c58b49815a0eab8d683f0a94f75cbbe64e;hp=fae6b35be779b37270e76ef319128e3bb5251e51 + +move OAuth2 to last place in auto auth selection + +IMAP: when using 'automatic' auth type, if the server offers LOGIN, GSSAPI or plaintext in addition to OAUTH2, yet OAUTH2 is unconfigured, authentication will fail. This broke previously working config +--- + +diff --git a/src/imap.c b/src/imap.c +index c486c471a..b72ceea76 100644 +--- a/src/imap.c ++++ b/src/imap.c +@@ -951,14 +951,14 @@ static gint imap_auth(IMAPSession *session, const gchar *user, const gchar *pass + ok = imap_cmd_login(session, user, pass, "SCRAM-SHA-1"); + if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "PLAIN")) + ok = imap_cmd_login(session, user, pass, "PLAIN"); +- if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "XOAUTH2")) +- ok = imap_cmd_login(session, user, pass, "XOAUTH2"); + if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "LOGIN")) + ok = imap_cmd_login(session, user, pass, "LOGIN"); + if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "GSSAPI")) + ok = imap_cmd_login(session, user, pass, "GSSAPI"); + if (ok == MAILIMAP_ERROR_LOGIN) /* we always try plaintext login before giving up */ + ok = imap_cmd_login(session, user, pass, "plaintext"); ++ if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "XOAUTH2")) ++ ok = imap_cmd_login(session, user, pass, "XOAUTH2"); + } + + if (ok == MAILIMAP_NO_ERROR) +@@ -994,6 +994,11 @@ static gint imap_auth(IMAPSession *session, const gchar *user, const gchar *pass + "LOGIN SASL plugin is installed."); + } + ++ if (type == IMAP_AUTH_OAUTH2) { ++ ext_info = _("\n\nOAuth2 error. Check and correct your OAuth2 " ++ "account preferences."); ++ } ++ + if (time(NULL) - last_login_err > 10) { + if (!prefs_common.no_recv_err_panel) { + alertpanel_error_log(_("Connection to %s failed: " |