maxcountryman/flask-bcrypt

Flask-Bcrypt not working with latest version of Bcrypt

vinhliem opened this issue · 1 comments

Bcrypt just release new version 4.0.0 https://pypi.org/project/bcrypt/#history on August 24th and your module will not work with this version. I think fixed bcrypt version at 3.2.0 or below 4.0.0 will prevent an error happens like we had.

File "/usr/local/lib/python3.6/site-packages/flask_bcrypt.py", line 193, in check_password_hash
return safe_str_cmp(bcrypt.hashpw(password, pw_hash), pw_hash)
File "/usr/local/lib/python3.6/site-packages/bcrypt/__init__.py", line 84, in hashpw
return _bcrypt.hashpass(password, salt)
TypeError: argument 'salt': 'bytearray' object cannot be converted to 'PyBytes'

What version are you using? I tried flask-bcrypt 0.7.1, 1.0.0 and 1.0.1 and none did raise that error with bcrypt 4.0.0. Any specific inputs for which this error occurs?