-
Notifications
You must be signed in to change notification settings - Fork 97
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
Logout bug #121
Comments
Digging into this further it appears that because we have |
This bug for sure still exists in the most recent version. create_logout_response calls _status_response which returns either the class or the string representation of the class. The view goes forward assuming it got the object and not the string. |
+1 with the same issue |
@longshine I've been meaning to hop back on and get my PR fixed. What we did since we're stuck on |
I ran into the same problem with --- site-packages/djangosaml2idp/views.py.orig 2021-07-05 17:40:31.471614643 +0200
+++ site-packages/djangosaml2idp/views.py 2021-08-24 16:30:34.455854131 +0200
@@ -375,6 +375,7 @@
return error_cbv.handle_error(request, exception=excp, status_code=400)
resp = idp_server.create_logout_response(req_info.message, [binding])
+ rinfo = idp_server.response_args(req_info.message, [binding])
'''
# TODO: SOAP
@@ -390,13 +391,13 @@
try:
# hinfo returns request or response, it depends by request arg
- hinfo = idp_server.apply_binding(binding, resp.__str__(), resp.destination, relay_state, response=True)
+ hinfo = idp_server.apply_binding(rinfo["binding"], resp, rinfo["destination"], relay_state, response=True)
except Exception as excp:
logger.error("ServiceError: %s", excp)
return error_cbv.handle_error(request, exception=excp, status=400)
- logger.debug("--- {} Response [\n{}] ---".format(self.__service_name, repr_saml(resp.__str__().encode())))
- logger.debug("--- binding: {} destination:{} relay_state:{} ---".format(binding, resp.destination, relay_state))
+ logger.debug("--- {} Response [\n{}] ---".format(self.__service_name, repr_saml(resp.encode())))
+ logger.debug("--- binding: {} destination:{} relay_state:{} ---".format(rinfo["binding"], rinfo["destination"], relay_state))
# TODO: double check username session and saml login request
# logout user from IDP This fix was inspired by code that I found in pysaml2: site-packages/saml2/client.py, line 678. |
+1 same issue |
I'm still running
djangosaml2idp==0.6.3
and running into an issue w/ the logout view. It looks like theresp
is already a string and not an object causing an exception to be thrown.Specifically
resp.destination
is causing the issue.resp
is set prior via an IDP method.I was looking through the newest code and it appears this might have been fixed already. Not entirely sure.
The text was updated successfully, but these errors were encountered: