You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason after updating to the latest versions of sqlalchemy and sqlalchemy utils, checking hashed passwords started to fail with a TypeError:
if this_password.password == password:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/quill/quill/venv3.11/lib/python3.11/site-packages/sqlalchemy_utils/types/password.py", line 60, in __eq__
] valid, new = self.context.verify_and_update(value, self.hash)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/quill/quill/venv3.11/lib/python3.11/site-packages/passlib-1.7.4-py3.11.egg/passlib/context.py", line 2422, in verify_and_update
record = self._get_or_identify_record(hash, scheme, category)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/quill/quill/venv3.11/lib/python3.11/site-packages/passlib-1.7.4-py3.11.egg/passlib/context.py", line 2031, in _get_or_identify_record
return self._identify_record(hash, category)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/quill/quill/venv3.11/lib/python3.11/site-packages/passlib-1.7.4-py3.11.egg/passlib/context.py", line 1122, in identify_record
raise ExpectedStringError(hash, "hash")
changing line 60 of types/password.py to read:
valid, new = self.context.verify_and_update(value, self.hash.decode())
appears to fix the error.
I'm not sure what is suddenly either causing the hash to be passed to the application as a bytearray or what is suddenly causing sqlalchemy-utils to complain.
As far as I can tell the column type has not changed in the database.
The text was updated successfully, but these errors were encountered:
For some reason after updating to the latest versions of sqlalchemy and sqlalchemy utils, checking hashed passwords started to fail with a TypeError:
changing line 60 of types/password.py to read:
valid, new = self.context.verify_and_update(value, self.hash.decode())
appears to fix the error.
I'm not sure what is suddenly either causing the hash to be passed to the application as a bytearray or what is suddenly causing sqlalchemy-utils to complain.
As far as I can tell the column type has not changed in the database.
The text was updated successfully, but these errors were encountered: