From dfab77514703d75d3874bd382fdcde4ec922553c Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Mon, 4 Apr 2022 22:48:12 -0600 Subject: [PATCH] * Cancel refresh token when a code 400 is received from the server. * Crash in PC-Alpine when creating a mail collection and no username is indicated in the server path. Reported by Sandy Schuman. --- alpine/osdep/termout.wnt.c | 3 +-- imap/src/c-client/oauth2_aux.c | 1 + pith/pine.hlp | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/alpine/osdep/termout.wnt.c b/alpine/osdep/termout.wnt.c index 4e29f28..22d90c3 100644 --- a/alpine/osdep/termout.wnt.c +++ b/alpine/osdep/termout.wnt.c @@ -782,8 +782,7 @@ os_login_dialog (NETMBX *mb, char *user_utf8, int userlen, tpwd_utf8 = lptstr_to_utf8(dlgpw.pwd); if(tpwd_utf8){ - strncpy(*pwd_utf8, tpwd_utf8, pwdlen - 1); - (*pwd_utf8)[pwdlen - 1] = '\0'; + *pwd_utf8 = cpystr(tpwd_utf8); fs_give((void **) &tpwd_utf8); } if(prespass) diff --git a/imap/src/c-client/oauth2_aux.c b/imap/src/c-client/oauth2_aux.c index eac92a1..3bb4b50 100644 --- a/imap/src/c-client/oauth2_aux.c +++ b/imap/src/c-client/oauth2_aux.c @@ -314,6 +314,7 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method, switch(status){ case HTTP_UNAUTHORIZED: mm_log("Client not authorized (wrong client-id?)", ERROR); + oauth2->cancel_refresh_token++; break; case HTTP_OK: if(oauth2->access_token) fs_give((void **) &oauth2->access_token); diff --git a/pith/pine.hlp b/pith/pine.hlp index fc2e5a4..bd848b3 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 639 2022-03-13 10:52:22 +Alpine Commit 640 2022-04-04 22:47:37 ============= h_news ================= @@ -266,6 +266,9 @@ Bugs addressed include: global smtp-server, then Alpine will use the sendmail-path even when the user configured a smtp-server for a role. Reported by Gregory Heytings. + +
  • Crash in PC-Alpine when creating a mail collection and no username is + indicated in the server path. Reported by Sandy Schuman.

    Version 2.25 adds new features and addresses bugs found in previous -- 2.11.4.GIT