-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
AttributeError: 'SHA512' object has no attribute 'update' #364
Comments
I think this was caused by this switch alongside the code changes linked above: #230 |
The related code is actually django-rest-knox/knox/crypto.py Line 30 in 1e379b4
and django-rest-knox/knox/crypto.py Line 6 in 1e379b4
This is weird because the interface should have the update method according to the Python doc https://docs.python.org/3/library/hashlib.html#hash-algorithms What do you have in your settings ? Could you have a bad import there ? Also the Python version might be a factor here which version are you using? I recommend we improve the test suite of knox to cover all the hash functions we support. Cheers ! |
@johnraz Yup, that's excatly the place having issues. I'm using the old default
👍 to this. |
In
With the signature change the I wanted to keep old tokens working with #362, but now I'm not 100% sure it'll work as is currently. |
I'll close this now since the issue was me trying to use a now incompatible hashing method. If anyone is looking for a solution when bumping into this issue: just remove the line below and let the library use the default from
I think we'll need to do a better job at documentation when changes like this come in. I'll be more attentive when reviewing PRs related to this now. |
When migrating my project to version
5.x
, I get the following error when running tests:Related code:
django-rest-knox/knox/crypto.py
Line 15 in 1e379b4
Investigation ongoing.
The text was updated successfully, but these errors were encountered: