-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Different lenght of tokens from 0.26 to 2.0.1? #257
Comments
I can't reproduce this issue. I tried the following code with both ItsDangerous 0.24 and 2.0.1 and got the same result. Some things have definitely changed between 0.24 and 2.0.1, so you might have luck using
That said, itsdangerous doesn't produce a constant token size, it will depend on the input. Perhaps your input changed? I'd definitely advise against sized string columns, all modern databases allow omitting the size. |
@davidism sorry for not being clear about the serializer, with your sample I created this
On python 3.9.6 I get Any hint about how to go about this? so that on 3.9 returns the same as on 3.6? |
Just going a little furter on this, extended the sample a little to use pyjwt
which gives
and
What is happening here? did implementations of HS256 change from 3.6 to 3.9??? Or what Im doing wrong? you think there is a solution for 3.9 to give same result than for 3.6? |
Sorry, I can't help you debug this further. It seems like there's something different between 3.6 and 3.9, not an issue with itsdangerous. Additionally, we no longer support JWS, it will be completely removed in 2.1. |
Hi there, Im migrating an flask app from 1.0.2 with itsdangerous==0.24 in python 3.6.9... to flask 2.0.1 with itsdangerous 2.0.1 and python 3.9.6.
The problem Im having is that the saved tokens on the old_configuration are from 160 bytes, but in the new_configuration it requires 165 (this value I after seeing the test didn't pass and seeing that the column was not enought big to hold 165 bytes).
And in fact I can switch on my conda environments and execute the same code pointing to same original database size (160) and the old_config works and obviously the new one don't, just switching the conda envs.
But after I can read the old tokens on the new configuration I can think of what to do next...
I hope to write a test case to show the difference, but if for the moment you have any hint on that, it would be helpfull.
Old Environment:
New environment:
The text was updated successfully, but these errors were encountered: