[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-38-gc9b487514
miras at claws-mail.org
miras at claws-mail.org
Tue Feb 6 23:17:41 UTC 2024
The branch, gtk2 has been updated
via c9b487514f760ca8c749da2614b7cc5201cbbef9 (commit)
from a556fef7d46141587a98c7a5f5eb5b9d9f9539f2 (commit)
Summary of changes:
src/prefs_account.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
- Log -----------------------------------------------------------------
commit c9b487514f760ca8c749da2614b7cc5201cbbef9
Author: Michael Rasmussen <mir at datanom.net>
Date: Wed Feb 7 00:17:33 2024 +0100
Fix bug #4765 oauth2: only store smtp auth if authorization method is OAUTH2 fix bug #4766 oauth2: preserve the expiry value of SMTP auth type is not OAUTH2 patches by Olaf Hering
Signed-off-by: Michael Rasmussen <mir at datanom.net>
diff --git a/src/prefs_account.c b/src/prefs_account.c
index c58b04aac..0b7312091 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -3772,7 +3772,8 @@ static gint prefs_send_apply(void)
FALSE);
#ifdef USE_OAUTH2
/* Manual password change - reset expiry on OAUTH2 tokens*/
- passwd_store_set_account(tmp_ac_prefs.account_id, PWS_ACCOUNT_OAUTH2_EXPIRY, "0", FALSE);
+ if (tmp_ac_prefs.use_smtp_auth && tmp_ac_prefs.smtp_auth_type == SMTPAUTH_OAUTH2)
+ passwd_store_set_account(tmp_ac_prefs.account_id, PWS_ACCOUNT_OAUTH2_EXPIRY, "0", FALSE);
#endif
return 0;
@@ -5301,13 +5302,14 @@ static void prefs_account_oauth2_obtain_tokens(GtkButton *button, gpointer data)
if(OAUTH2Data->access_token != NULL){
passwd_store_set_account(tmp_ac_prefs.account_id,
PWS_ACCOUNT_RECV, OAUTH2Data->access_token, FALSE);
+ gtk_entry_set_text(GTK_ENTRY(basic_page.pass_entry), OAUTH2Data->access_token);
- passwd_store_set_account(tmp_ac_prefs.account_id,
- PWS_ACCOUNT_SEND, OAUTH2Data->access_token, FALSE);
+ if (tmp_ac_prefs.use_smtp_auth && tmp_ac_prefs.smtp_auth_type == SMTPAUTH_OAUTH2) {
+ passwd_store_set_account(tmp_ac_prefs.account_id,
+ PWS_ACCOUNT_SEND, OAUTH2Data->access_token, FALSE);
+ gtk_entry_set_text(GTK_ENTRY(send_page.smtp_pass_entry), OAUTH2Data->access_token);
+ }
log_message(LOG_PROTOCOL, "OAuth2 access token stored\n");
-
- gtk_entry_set_text(GTK_ENTRY(basic_page.pass_entry), OAUTH2Data->access_token);
- gtk_entry_set_text(GTK_ENTRY(send_page.smtp_pass_entry), OAUTH2Data->access_token);
}
if(OAUTH2Data->expiry_str != NULL){
@@ -6349,10 +6351,11 @@ static void prefs_account_oauth2_callback(GObject *source, GAsyncResult *res, gp
PWS_ACCOUNT_RECV,
oauth2_listener_data->OAUTH2Data->access_token,
FALSE);
- passwd_store_set_account(tmp_ac_prefs.account_id,
- PWS_ACCOUNT_SEND,
- oauth2_listener_data->OAUTH2Data->access_token,
- FALSE);
+ if (tmp_ac_prefs.use_smtp_auth && tmp_ac_prefs.smtp_auth_type == SMTPAUTH_OAUTH2)
+ passwd_store_set_account(tmp_ac_prefs.account_id,
+ PWS_ACCOUNT_SEND,
+ oauth2_listener_data->OAUTH2Data->access_token,
+ FALSE);
log_message(LOG_PROTOCOL, "OAuth2 access token stored\n");
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list