Last active
December 15, 2023 12:02
-
-
Save babldev/502364a3f7c9bafaa6db to your computer and use it in GitHub Desktop.
Decode a Flask Session cookie, given the cookie and secret key
itsdangerous recently switched to sha512, so depending upon which version of itsdangerous you are using you may need a hashlib.sha512
digest_method
pallets/itsdangerous@24ff676#diff-e4eb329834da3d36278b1b7d943b3bc9R11
Current line in sessions.py still uses hashlib.sha1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's easier and more robust to use class inheritance. Take a look at my gist:
https://gist.github.com/aescalana/7e0bc39b95baa334074707f73bc64bfe