openva / richmondsunlight.com

The Richmond Sunlight website.
https://www.richmondsunlight.com/
MIT License
12 stars 3 forks source link

Hash passwords better #330

Open waldoj opened 5 years ago

waldoj commented 5 years ago

All passwords are hashed with md5(), which is not appropriate in 2019. It was barely appropriate in 2006 (when the code was written). PHP has native password functionality — use that.

waldoj commented 5 years ago

Realistically, I think we'll need two, side-by-side password systems. New accounts use the new one. Anybody logging into a legacy account will, invisibly, have their password re-hashed and stored in the new system, and then have their old password wiped. After ~14 months, I think then it's time to zero out any legacy passwords — at that point, those folks can just use the "forgot my password" link to get into their accounts.