You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I run the code just almost same as demo-flask.
And when it run to this line redirect(auth.logout(name_id=name_id, session_index=session_index)).
This is error output:
[2018-05-04 22:26:48,887] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/LoginWeb/tzfserver/start.py", line 88, in Login
url = auth.process_slo(delete_session_cb=dscb)
File "/usr/local/lib/python3.6/site-packages/onelogin/saml2/auth.py", line 144, in process_slo
logout_response = OneLogin_Saml2_Logout_Response(self.__settings, get_data['SAMLResponse'])
File "/usr/local/lib/python3.6/site-packages/onelogin/saml2/logout_response.py", line 42, in __init__
self.document = OneLogin_Saml2_XML.to_etree(self.__logout_response)
File "/usr/local/lib/python3.6/site-packages/onelogin/saml2/xml_utils.py", line 65, in to_etree
return OneLogin_Saml2_XML._parse_etree(xml)
File "/usr/local/lib/python3.6/site-packages/defusedxml/lxml.py", line 143, in fromstring
rootelement = _etree.fromstring(text, parser, base_url=base_url)
File "src/lxml/etree.pyx", line 3213, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1871, in lxml.etree._parseMemoryDocument
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
with
python 3.6.4
Flask (1.0.2)
gunicorn (19.8.1)
lxml (4.2.1)
python3-saml (1.4.1)
xmlsec (1.3.3)
I solve it by modifying logout_response.py
to this self.document = OneLogin_Saml2_XML.to_etree(self.__logout_response.encode())
Do I have wrong configuration that makes this error?
The text was updated successfully, but these errors were encountered:
Just same as demo code
After login,
auth.get_nameid() is store in session. session['samlNameId'] = auth.get_nameid()
And before logout,
name_id is restore from session['samlNameId']
Hi,
I run the code just almost same as demo-flask.
And when it run to this line
redirect(auth.logout(name_id=name_id, session_index=session_index))
.This is error output:
with
I solve it by modifying logout_response.py
to this
self.document = OneLogin_Saml2_XML.to_etree(self.__logout_response.encode())
Do I have wrong configuration that makes this error?
The text was updated successfully, but these errors were encountered: