diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-07-06 03:04:58 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-07-06 03:04:58 -0600 |
commit | ac19531ad7822a885dcfa3b35aadb64168773299 (patch) | |
tree | 5652c5bf808563abb59a8e410a00cb2a19c2955e | |
parent | a8cfdb651a486641b6671c6bc5ce6c8fb506a995 (diff) | |
download | alpine-ac19531ad7822a885dcfa3b35aadb64168773299.tar.xz |
* Alpine might offer more than one client-id when trying to use XOAUTH2
with a server for which it is configured with only one client-id.
-rw-r--r-- | alpine/xoauth2conf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/alpine/xoauth2conf.c b/alpine/xoauth2conf.c index 13227775..0058a3e1 100644 --- a/alpine/xoauth2conf.c +++ b/alpine/xoauth2conf.c @@ -300,10 +300,9 @@ oauth2_get_client_info(unsigned char *name, char *user) } free_xoauth2_info(&x); } - for(i = 0; xoauth_default[i].name != NULL && strcmp(xoauth_default[i].name, name); i++){ - for(j = 0; xinfo && xinfo[j] && !same_xoauth2_info(xoauth_default[i], *xinfo[j]); j++); - if(xoauth_default[i].name && !xinfo[j]) xinfo[matches++] = copy_xoauth2_info(&xoauth_default[i]); - } + for(i = 0; xoauth_default[i].name != NULL && strcmp(xoauth_default[i].name, name); i++); + for(j = 0; xinfo && xinfo[j] && !same_xoauth2_info(xoauth_default[i], *xinfo[j]); j++); + if(!xinfo[j]) xinfo[matches++] = copy_xoauth2_info(&xoauth_default[i]); /* if after removing the duplicate entries, we only have one, use it */ if(matches == 1){ |