talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit f41b7cb1809fc49472888d36fb01502b3d0d63d3
parent d0f3df42c68d9f68576666b61f746c891ff407af
Author: Michael Rasmussen <mir@datanom.net>
Date:   Fri, 26 Feb 2021 14:56:14 +0100

Fix to prevent change password if OAUTH2 is not used for SMTP

Signed-off-by: Michael Rasmussen <mir@datanom.net>

Diffstat:
Msrc/oauth2.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/oauth2.c b/src/oauth2.c @@ -426,7 +426,8 @@ gint oauth2_check_passwds (PrefsAccount *ac_prefs) log_message(LOG_PROTOCOL, "OAUTH2 access token not obtained\n"); }else{ passwd_store_set_account(ac_prefs->account_id, PWS_ACCOUNT_RECV, OAUTH2Data->access_token, FALSE); - passwd_store_set_account(ac_prefs->account_id, PWS_ACCOUNT_SEND, OAUTH2Data->access_token, FALSE); + if (ac_prefs->use_smtp_auth && ac_prefs->smtp_auth_type == SMTPAUTH_OAUTH2) + passwd_store_set_account(ac_prefs->account_id, PWS_ACCOUNT_SEND, OAUTH2Data->access_token, FALSE); passwd_store_set_account(ac_prefs->account_id, PWS_ACCOUNT_OAUTH2_EXPIRY, OAUTH2Data->expiry_str, FALSE); log_message(LOG_PROTOCOL, "OAUTH2 access token updated\n"); }