]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
fix: keep going when forms have only hidden fields
authorJoachim Kuebart <joachim.kuebart@gmail.com>
Tue, 9 Mar 2021 12:48:19 +0000 (13:48 +0100)
committerJoachim Kuebart <joachim.kuebart@gmail.com>
Wed, 10 Mar 2021 21:21:11 +0000 (22:21 +0100)
Don't consider forms with hidden fields empty.

Signed-off-by: Joachim Kuebart <joachim.kuebart@gmail.com>
main.c

diff --git a/main.c b/main.c
index 31bd5c1d10cabba5ce55810eac30b49ba134a3fb..6a7e243694e220e8702c4e547d24d8a35c04c194 100644 (file)
--- a/main.c
+++ b/main.c
@@ -2548,7 +2548,8 @@ static int process_auth_form_cb(void *_vpninfo,
                        if (!opt->_value)
                                goto err;
                        empty = 0;
-               } else if (opt->type == OC_FORM_OPT_TOKEN) {
+               } else if (opt->type == OC_FORM_OPT_TOKEN ||
+                          opt->type == OC_FORM_OPT_HIDDEN) {
                        /* Nothing to do here, but if the tokencode is being
                         * automatically generated then don't treat it as an
                         * empty form for the purpose of loop avoidance. */