[A-05] /api/games/import and /api/games/search allow anonymous calls #41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Audit ID: A-05 · Priority: P1 · Effort: S
/api/games/importand/api/games/searchallow anonymous calls.importusesget_current_user_optional, so anyone can trigger BGG fetches and DB writes, andsearchhas no auth at all. This is an abuse and quota risk against BGG. The@router.post("/import")decorator is also duplicated (games/router.py:493-494).Source:
AUDIT_FINDINGS.md(audit 2026-10-11). Items marked (verify) need confirming first.Added per-IP rate limits (30/min search, 20/min import), a 100-char query cap and removed the duplicate decorator. Anonymous access is kept on purpose: anonymous groups use the game picker, so requiring login would break them. Limits are in-memory per instance (best effort on serverless). Commit
3df042eon staging (VERSION 1.28.6).