- Move MySQL migrations into a separate class
- Add migration for last IP column to be nullable if it has a not null constraint without a default value
- Check not only for NOT NULL constraint but also if a column has a default value
- Use suffixes instead of colors only so the command is usable via console
- Add argon2 implementation
- Extract argon2 library check to method on Argon 2
- Add link to Wiki page on errors
- Check within Argon2Test if the test cases should be run, not in the abstract parent
- Old SQLite setups have the last IP column as NOT NULL but without a default value. With the new concept (where we don't set a last IP on player registration) it fails.
- Create an /authme debug child that allows to migrate SQLite (tricky because SQLite does not support dropping or modifying columns)
- Allow last IP column to be NOT NULL in MySQL as well (extend MySQL /authme debug child)
- Add TODO comments with follow-up issue to extend our commands with new registration IP field
- Deprecate unsalted hashes: if such a hash is configured, move it to the legacy hashes setting to still support the existing hashes in the database but hash all passwords from now on with our default, SHA256.
* Introduce hasSession field in datasource
That makes isLogged more consistent as it will be '1' only when the player is online.
* Fixes
* Fix unit testing
* Update config doc
* Create SessionService
* Create test for SessionService, avoid DB operations if sessions are disabled
* Cleanup: remove outdated warning for session timeout = 0
- Remove outdated warning
- Encapsulate session enabled check in SessionService
* Fix failing SessionServiceTest, add data source integration tests for session methods
- Take MAX(reg_date, login_date) as timestamp to compare against
- Remove the second "all" parameter to include entries with 0 registration date -> we expect registration date to always be set to the current date, so the parameter becomes obsolete
- Create command under /authme debug that allows to change the 'nullable' status of MySQL columns (currently last date and email only)
- We need to offer a default value for forum integrations that have a NOT NULL email column. Offering a command avoids us from force-migrating existing databases while still offering migrations in both directions
- Change in default value handling: lack of values are not handled by setting default values to the PlayerAuth anymore, and reading a default value from the database into a PlayerAuth will be translated into null by the PlayerAuth builder
- When a new database is created, email and lastlogin are now nullable and lack a default a value
Open points:
- Finish MySqlDefaultChangerTest
- Revise purging logic (#792)
- Allow to have more columns nullable (#814)