]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
auth: Implement special handling of <select> dropdowns on XML POST
authorKevin Cernekee <cernekee@gmail.com>
Sun, 17 Feb 2013 00:18:04 +0000 (16:18 -0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 17 Feb 2013 21:54:07 +0000 (21:54 +0000)
commit5c4d37a138ed63358315cd23a465f187db7893fc
tree101c7c706ae7a2029e6533374543745764a13e40
parent91462d2ee26de0119d91d7e839d6115e961f4c81
auth: Implement special handling of <select> dropdowns on XML POST

Experimentation with the Cisco AnyConnect client showed that the
following changes need to be made for compatibility:

1) If the "value" attribute is missing from the <option> node, use the
XML node content instead.  i.e. this should post as
"<dropdown>vpn</dropdown>":

    <select name="dropdown">
      <option>vpn</option>
    </select>

And this should post as "<dropdown>optname</dropdown>":

    <select name="dropdown">
      <option value="optname">vpn</option>
    </select>

2) If the name of the <select> node happens to be "group_list", put the
response in a special <group-select> node right under the <config-auth>
node, instead of putting it under the <auth> node.  (These strings are
hardcoded into the Cisco client.)

Reported-by: Fabian Jäger <fabian.jaeger@chungwasoft.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
auth.c