sonicnkt / glauth-ui

Glauth management ui created with python/flask
MIT License
85 stars 19 forks source link

Encrypt passwords using bcrypt, keep sha256 for backwards compatibility #26

Open Jonny007-MKD opened 1 year ago

Jonny007-MKD commented 1 year ago

The number of rounds can be specified by BCRYPT_ROUNDS environment variable. The default value is 14, as it takes 600 ms on my machine. As we currently only support bcrypt and plain sha256 hashes, we can distinguish them by the leading '$' of bcrypt hashes. Upgrading hashes on login is not yet implemented.

sonicnkt commented 1 year ago

Thanks for the contribution. As i merged some other PRs first there is now a VERY minimal conflict. If you have the time to fix this in your branch i will merge it right away otherwise i will probably do it myself in the next days as i want to get into glauth-ui dev again.

Any plans for implementing automatic password migration? Otherwise i will add a function for this to the login mechanism myself :)

Jonny007-MKD commented 1 year ago

done :)