vlaci/openconnect-sso

lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: br line 4 and body, line 7, column 8

kokizzu opened this issue · 0 comments

Got an error when conencting:

Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/openconnect-sso", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/.local/lib/python3.10/site-packages/openconnect_sso/cli.py", line 175, in main
    return app.run(args)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/openconnect_sso/app.py", line 35, in run
    auth_response, selected_profile = asyncio.get_event_loop().run_until_complete(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/openconnect_sso/app.py", line 152, in _run
    auth_response = await authenticate_to(
  File "/home/ubuntu/.local/lib/python3.10/site-packages/openconnect_sso/authenticator.py", line 23, in authenticate
    response = self._start_authentication()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/openconnect_sso/authenticator.py", line 68, in _start_authentication
    return parse_response(response)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/openconnect_sso/authenticator.py", line 138, in parse_response
    xml = objectify.fromstring(resp.content)
  File "src/lxml/objectify.pyx", line 2010, in lxml.objectify.fromstring
  File "src/lxml/etree.pyx", line 3264, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1916, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1803, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1144, in lxml.etree._BaseParser._parseDoc
  File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
  File "<string>", line 7
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: br line 4 and body, line 7, column 8

the xml content:

<?xml version='1.0' encoding='UTF-8'?>
<config-auth client="vpn" type="init" aggregate-auth-version="2">
  <version who="vpn">4.7.00136</version>
  <device-id>linux-64</device-id>
  <group-select></group-select>
  <group-access>https://xxx/+CSCOE+/message.html</group-access>
  <capabilities>
    <auth-method>single-sign-on-v2</auth-method>
  </capabilities>
</config-auth>

oh wait, it's:

[debug    ] Auth init response received    [openconnect_sso.authenticator] content=b'\n<html>\n<body>\n<br>\n\n<center><b></b></center>\n</body>\n</html>\n\n\n'