Skip to content
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

Flask-Bcrypt not working with latest version of Bcrypt #89

Open
vinhliem opened this issue Sep 19, 2022 · 1 comment
Open

Flask-Bcrypt not working with latest version of Bcrypt #89

vinhliem opened this issue Sep 19, 2022 · 1 comment

Comments

@vinhliem
Copy link

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'
@bliepp
Copy link

bliepp commented Sep 25, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants