Harden auth validation against null request fields
This commit is contained in:
1
TESTS.md
1
TESTS.md
@@ -33,6 +33,7 @@ stateDiagram-v2
|
||||
### 1) Authentication & Identity
|
||||
- Register success (player, admin key path) issues cookie, trims fields, stores normalized username, hashes password.
|
||||
- Register rejects missing/long username, weak password policy violations, missing display name, duplicate username, bad admin key, >24 chars username, >16 display name.
|
||||
- Register/login null payload fields fail closed with `400` (no `500` on malformed JSON bodies).
|
||||
- Bootstrap-admin key path only works until the owner account exists; bootstrap admin is marked as owner.
|
||||
- Database uniqueness guard enforces single owner row (`IsOwner=true`) even if writes bypass endpoint-level checks.
|
||||
- `/api/auth/options` reports owner presence for registration UI behavior.
|
||||
|
||||
Reference in New Issue
Block a user