]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
fix: fix Juniper Azure SSO login
authorJoachim Kuebart <joachim.kuebart@gmail.com>
Sat, 3 Apr 2021 20:44:44 +0000 (22:44 +0200)
committerDaniel Lenski <dlenski@gmail.com>
Mon, 5 Apr 2021 16:20:45 +0000 (09:20 -0700)
Signed-off-by: Joachim Kuebart <joachim.kuebart@gmail.com>
auth-juniper.c

index dbff5ea150ece4e63971a64a859ff585e66ca5df..1dc6d20580fadfb40a09f3fd4b7e2c1d15803980 100644 (file)
@@ -60,7 +60,9 @@ static int oncp_can_gen_tokencode(struct openconnect_info *vpninfo,
            vpninfo->token_bypassed)
                return -EINVAL;
 
-       if (!strcmp(form->auth_id, "frmLogin")) {
+       if (opt->type == OC_FORM_OPT_PASSWORD &&
+           (!strcmp(form->auth_id, "frmLogin") ||
+            !strcmp(form->auth_id, "loginForm"))) {
                /* XX: The first occurence of a password input field in frmLogin is likely to be a password,
                 * not token, input. However, if we have already added a password input field to this form,
                 * then a second one is likely to hold a token.