-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
New itsdangerous version invalidates cookie based sessions #2952
Comments
itsdangerous v1 has a breaking change that changes the session hashing algorithm. Users would be signed out when an build of flask that has depended on the new itsdangerous v1.0 is released. pallets#2952
That's an unfortunate case, I'm sorry it happened to you. Be sure to pin dependencies and check changelogs before upgrading libraries for projects you deploy to production. In this case, a major version bump is allowed to break things, and we're not going to prevent its use for everyone who's installing Flask going forward. If you want to provide a smoother transition, you can implement a |
Thanks. We're fine. We found this on our preview/dev environment after releasing an app with deps pinned to what the libraries (ie Flask) suggested. At the moment any of Flasks dependencies could release a completely incompatible version and break new installs of Flask. Pinning to sub major versions would help mitigate against this. |
All Flask dependencies are Pallets projects, so the risk is pretty low. |
We're figuring out how to roll back the digest method change: pallets/itsdangerous#111, pallets/itsdangerous#112 |
itsdangerous 1.1.0 has been released. It reverts to SHA-1, and adds a fallback mechanism to safely upgrade signing parameters in the future. It also reverts the package name to all lowercase "itsdangerous". You can read a longer explanation here: https://palletsprojects.com/blog/itsdangerous-1-1-0-released/ |
Expected Behaviour
User sessions should remain valid across versions.
Actual Behaviour
itsdangerous v1.0 was release about 16 hours ago.
Users are signed out when an build of flask that has depended on the new itsdangerous v1.0 is released. This is because the new version has a breaking change that changes the session hashing algorithm.
https://github.com/pallets/itsdangerous/blob/master/CHANGES.rst
https://github.com/pallets/flask/blob/master/flask/sessions.py#L6
https://github.com/pallets/flask/blob/master/setup.py#L39
https://pypi.org/project/itsdangerous/#history
Environment
The text was updated successfully, but these errors were encountered: