]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Recognise auth forms named "challenge" as token requests
authorJames Laird-Wah <james@laird-wah.net>
Wed, 18 Jul 2018 06:02:36 +0000 (16:02 +1000)
committerJames Laird-Wah <james@laird-wah.net>
Wed, 3 Oct 2018 06:37:45 +0000 (16:37 +1000)
This was found in the wild on an AnyConnect instance which is hooked up
to a Microsoft 2FA platform.

Signed-off-by: James Laird-Wah <james-oc@laird-wah.net>
auth.c

diff --git a/auth.c b/auth.c
index 83c186d3af830711fb2a3496878d4a804349d176..e476775508c4ba365df29210c0970970f3dcb4d0 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -893,7 +893,8 @@ static int cstp_can_gen_tokencode(struct openconnect_info *vpninfo,
        }
 #endif
        /* Otherwise it's an OATH token of some kind. */
-       if (strcmp(opt->name, "secondary_password"))
+       if (strcmp(opt->name, "secondary_password") &&
+        (!form->auth_id || strcmp(form->auth_id, "challenge")))
                return -EINVAL;
 
        return can_gen_tokencode(vpninfo, form, opt);