summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
Diffstat (limited to 'pith')
-rw-r--r--pith/mailcmd.c14
-rw-r--r--pith/pine.hlp2
-rw-r--r--pith/state.h2
3 files changed, 17 insertions, 1 deletions
diff --git a/pith/mailcmd.c b/pith/mailcmd.c
index e5e70e02..c53afeb4 100644
--- a/pith/mailcmd.c
+++ b/pith/mailcmd.c
@@ -786,12 +786,26 @@ do_broach_folder(char *newfolder, CONTEXT_S *new_context, MAILSTREAM **streamp,
openmode | (open_inbox ? SP_INBOX : 0),
&rflags);
+ if(m == NULL
+ && ps_global->in_xoauth2_auth
+ && ps_global->preserve_password){
+ ps_global->in_xoauth2_auth = ps_global->user_says_cancel = ps_global->preserve_password = 0;
+ m = context_open((new_context && !open_inbox) ? new_context : NULL,
+ stream,
+ open_inbox ? ps_global->VAR_INBOX_PATH : expanded_file,
+ openmode | (open_inbox ? SP_INBOX : 0),
+ &rflags);
+ }
+
/*
* We aren't in a situation where we want a single cancel to
* apply to multiple opens.
*/
ps_global->user_says_cancel = 0;
+ /* we are not in authentication mode anymore */
+ ps_global->preserve_password = ps_global->in_xoauth2_auth = 0;
+
if(streamp)
*streamp = m;
diff --git a/pith/pine.hlp b/pith/pine.hlp
index ca3580c0..ed65de81 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 605 2021-10-22 17:11:47
+Alpine Commit 606 2021-10-23 17:48:46
============= h_news =================
<HTML>
<HEAD>
diff --git a/pith/state.h b/pith/state.h
index 9c6e66d1..12c5989e 100644
--- a/pith/state.h
+++ b/pith/state.h
@@ -145,6 +145,8 @@ struct pine {
unsigned fix_fixed_warning:1; /* offer to fix it */
unsigned user_says_cancel:1; /* user typed ^C to abort open */
+ unsigned in_xoauth2_auth:1; /* user is attempting xoauth2 authentication */
+ unsigned preserve_password:1; /* user is saving the password */
unsigned unseen_in_view:1;
unsigned start_in_context:1; /* start fldr_scrn in current cntxt */