pysaml2 icon indicating copy to clipboard operation
pysaml2 copied to clipboard

Accessing cache file by cni throwing KeyError on SLO

Open glaand opened this issue 1 year ago • 0 comments

Im trying to implement djangosaml2 into the project for the company i work for and they use SLO for logging users out. It turns out that the order of communication matther. The Idp will communicate with the SP and logging the user out but then after the user tries to refresh the browser, it is trying to access a dictionary that has been already emptied. Also the way the dictionary is been accessed is not totally correct. Should it not be wrapped wit ha try exception case? I guess if an exception is thrown just return an empty list?

Code Version

Latest Version

Expected Behavior

Returning empty list instead keyerror

Current Behavior

Keyerror

Possible Solution

reason is above

Steps to Reproduce

[

4.](https://github.com/IdentityPython/pysaml2/blob/2d47437a21aaaa77abed1b1aacdf5bda5a7f7b87/src/saml2/cache.py#L157)

image image

glaand avatar May 30 '23 19:05 glaand