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

User table - insufficient column length for password_hash #449

Open
bhodges-navapbc opened this issue Mar 14, 2024 · 1 comment
Open

User table - insufficient column length for password_hash #449

bhodges-navapbc opened this issue Mar 14, 2024 · 1 comment

Comments

@bhodges-navapbc
Copy link
Contributor

bhodges-navapbc commented Mar 14, 2024

Describe the bug
User creation fails when using a version of the Werkzeug dependency >= v3.0.0

Flask-MonitoringDashboard uses generate_password_hash, which has switched to defaulting to scrypt in werkzeug.security. This results in hashes with a length of 162, whereas the User table password_hash column has a length of 128.

To Reproduce
Steps to reproduce the behavior:

Perform a base install and attempt to login with the default credentials. An account is not created in the User table.

Example error output using PostgreSQL for the database would include "value too long for type character varying(128)"

@mircealungu
Copy link
Member

mircealungu commented Mar 14, 2024

Thanks for detecting and reporting the problem @bhodges-navapbc ! So the solution seems to be simply redefining the User table. Can you do that and send a PR? We'll integrate it right away if you could!

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