-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
IdP-initiated SLO does not work with Python3 #81
Comments
@pitbulk Sorry, maybe I should have searched better and updated #60 instead 😦 Unfortunately #77 does not solve the issue. Head of While checking #60 I found an important difference: I use an IdP-initiated SLO. Unlike #60, I don't experience any problems with response_url = auth.process_slo(delete_session_cb=logout_callback)
errors.extend(auth.get_errors()) now errors contain When the
Please let me know if I can provide any additional info that can help. |
SLO does not function properly. Probably only affects Python3.
Symptoms:
calling
OneLogin_Saml2_Auth.process_slo()
leads to:invalid_logout_request
Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
Cause
logout_request.py:115
:Afterwards
python3-saml
inOneLogin_Saml2_XML.to_etree()
callsdefusedxml.lxml.fromstring
withtext
argument containing astr
instance (unicode in Python3), which causes the error.Notes:
defusedxml.lxml.fromstring
is actually called twice duringOneLogin_Saml2_Auth.process_slo()
.defusedxml.lxml.fromstring
.defusedxml
to fail.Possible solution:
Replacing in
logout_request.py:115
with
solves the problem and makes SLO to function.
I am however not sure why
compat.to_string()
was used and which side effects removing it might cause.Versions
The text was updated successfully, but these errors were encountered: