ethanmoffat / etheos

[Eth]an's [E]ndless [O]nline [S]erver - fork of eoserv project
zlib License
13 stars 8 forks source link

Support versioned passwords #10

Closed ethanmoffat closed 4 years ago

ethanmoffat commented 4 years ago

Add support for versioned passwords. This allows implementing different password hashes with ease and versioning them in the database. The latest password version is stored (right now 1 == sha256, 2 == bcrypt) along with the hashed password.

As this requires a schema update to the database, I'm unofficially calling this v0.7.1.

Bcrypt implementation is https://github.com/trusch/libbcrypt, downloaded via CMake.

Password versions are updated on login in a background thread. A separate database connection is used for background thread updates.

This addresses issue 431 on the eoserv bug tracker.