motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.87k stars 651 forks source link

Update password hashing algorithm #2467

Open MichaIng opened 2 years ago

MichaIng commented 2 years ago

SHA1 is ancient and simple to brute-force. We should switch to something modern, like pbkdf2_hmac, available without 3rd party libraries: https://nitratine.net/blog/post/how-to-hash-passwords-in-python/

But to not lock out users, we must keep SHA1 as fallback, e.g. we can derive the algorithm of the stores hash to derive whether it's still SHA1 and in case on login prompt the user to re-set it so that it is stores with new algorithm.

Trigger-EX commented 7 months ago

+1