fix auth: validate logout body, harden WebAuthn, optimize list_users

- Raise ValueError on missing request body in auth_logout
- Add username check in verify_authentication to prevent credential reuse
- Replace N+1 queries in list_users with single JOIN query
This commit is contained in:
2026-08-12 03:58:54 +00:00
parent ba0c7bfa9b
commit 6f728cf853
5 changed files with 24 additions and 13 deletions
+3
View File
@@ -324,6 +324,9 @@ def verify_authentication(
raise ValueError("Credential not found")
cred_row = cred_rows[0]
if cred_row["username"] != username:
raise ValueError("Credential not found")
public_key = b64u_decode(cred_row["public_key"])
old_sign_count = cred_row["sign_count"]