diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-11-01 16:21:25 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-11-01 16:21:25 -0700 |
commit | fc5a3d34bb2dd42de653e2a2ad761d229aba8954 (patch) | |
tree | fa34d2f9b3cbd6a50947da6ecc8683367e6d492c /imap/src/c-client/auth_bea.c | |
parent | 649572ba29dfab09cb77a5c2f6f5d12e9822792c (diff) | |
download | alpine-fc5a3d34bb2dd42de653e2a2ad761d229aba8954.tar.xz |
* The previous commit does not allow clients to login using xoauth2, so
this commit fixes that.
Diffstat (limited to 'imap/src/c-client/auth_bea.c')
-rw-r--r-- | imap/src/c-client/auth_bea.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/imap/src/c-client/auth_bea.c b/imap/src/c-client/auth_bea.c index d9f5e067..4b001ac7 100644 --- a/imap/src/c-client/auth_bea.c +++ b/imap/src/c-client/auth_bea.c @@ -109,7 +109,7 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder if (!base) (*responder) (stream,NIL,NIL,0); *trial = 0; /* cancel subsequent attempts */ - ret = LONGT; /* will get a BAD response back */ + ret = base ? NIL : LONGT; /* will get a BAD response back */ } else { char ports[10]; @@ -145,12 +145,12 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder } } fs_give ((void **) &response); + if (!ret) + *trial = 65535; /* don't retry if bad protocol */ } } if(oauth2.param[OA2_Id].value) fs_give((void **) &oauth2.param[OA2_Id].value); if(oauth2.param[OA2_Secret].value) fs_give((void **) &oauth2.param[OA2_Secret].value); if(oauth2.param[OA2_Tenant].value) fs_give((void **) &oauth2.param[OA2_Tenant].value); - if (!ret) - *trial = 65535; /* don't retry if bad protocol */ return ret; } |