From 51f8feb644d4473620004669521b46da825c3739 Mon Sep 17 00:00:00 2001 From: James Laird-Wah Date: Wed, 18 Jul 2018 16:02:36 +1000 Subject: [PATCH] Recognise auth forms named "challenge" as token requests 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 --- auth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auth.c b/auth.c index 83c186d3..e4767755 100644 --- 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);