glauth-ui icon indicating copy to clipboard operation
glauth-ui copied to clipboard

Encrypt passwords using bcrypt, keep sha256 for backwards compatibility

Open Jonny007-MKD opened this issue 2 years ago • 2 comments

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.

Jonny007-MKD avatar Jan 08 '23 21:01 Jonny007-MKD

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 :)

sonicnkt avatar Feb 12 '23 16:02 sonicnkt

done :)

Jonny007-MKD avatar Feb 12 '23 20:02 Jonny007-MKD