8 Commits

Author SHA1 Message Date
6b9ae4c325
Validate name wheel names 2025-01-06 23:43:37 -05:00
ed9fe61faf
Auth cookie refresh on PC_EXIT 2024-11-23 11:29:55 -08:00
55cf3f7102
Refactor login packet handler for more flexible auth (#298)
This PR enables auth cookies to be used simultaneously with plaintext paasswords sent in the cookie authID field.

* Hoist a bunch of checks from the login packet handler into helper functions.
* Rename the LoginType enum to AuthMethod and distinguish it from the iLoginType packet field (see comment in code for why these should be decoupled).
* If the provided token does not pass the cookie check and password auth is enabled, treat it as a plaintext password and authenticate if it is correct.
2024-11-17 05:21:37 +01:00
a6eb0e2349
Auth Cookie Support (#285)
* Auth cookie support

* Add config option for auth cookie support

* Safe handling of TEGid/auth_id strings

* Fix bad size calculation due to pointer cast

* Expiration timestamp instead of valid bit

* Change setting to "allowed auth methods"

This allows plaintext password auth to be disabled altogether

* PR feedback
2024-09-17 20:41:48 -07:00
Gent Semaj
b780f5ee60
Enable account level changing at runtime (#282)
* Enable account level change at runtime

* PR feedback
2024-06-23 20:25:46 -05:00
3f44f53f97 On login, load Player from DB in shard thread, not in login thread
This avoids some needless data shuffling and fixes a rare desync.
2022-12-06 01:07:21 +01:00
574f0cab09 Added a wrapper for U16toU8, called AUTOU16TOU8
- U16toU8 now requires a max arument to be passed
2021-03-17 23:41:47 -05:00
c5776b9322 [refactor] Split Database.cpp into db subdirectory
* Database.hpp is still the only external include file (moved to db/)
* The header is still uppercase to match its namespace
* db/internal.hpp is the shared header for the DB source files
* Added -Isrc/ compile flag for src-relative include paths
* Hoisted CHDR above CSRC in Makefile (it was bothering me)
* make clean now removes all objects in the subdirectories as well
2021-03-16 02:13:24 +01:00