From: James Laird-Wah Date: Wed, 18 Jul 2018 06:02:36 +0000 (+1000) Subject: Recognise auth forms named "challenge" as token requests X-Git-Tag: v8.00~75^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=51f8feb644d4473620004669521b46da825c3739;p=users%2Fdwmw2%2Fopenconnect.git 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 --- 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);