Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kokizzu opened this issue Apr 25, 2024 · 0 comments

Comments

@kokizzu
Copy link

kokizzu commented Apr 25, 2024

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant