[security] Add rate limiting to session creation and login endpoints #35

Zamknięty
otworzone 2026-03-04 12:20:00 +01:00 przez clawbot · 2 komentarzy
Collaborator

From QA Audit (#25 comment)

Severity: SHOULD-FIX

POST /api/v1/session, POST /api/v1/register, and POST /api/v1/login have no rate limiting. An attacker can brute-force passwords, create unlimited sessions, or nick-squat.

Suggested fix: Add a per-IP rate limiter using golang.org/x/time/rate or chi rate-limit middleware.

## From QA Audit ([#25 comment](https://git.eeqj.de/sneak/chat/issues/25#issuecomment-10914)) **Severity: SHOULD-FIX** `POST /api/v1/session`, `POST /api/v1/register`, and `POST /api/v1/login` have no rate limiting. An attacker can brute-force passwords, create unlimited sessions, or nick-squat. **Suggested fix:** Add a per-IP rate limiter using `golang.org/x/time/rate` or chi rate-limit middleware.
Właściciel

only login should have the rate limit. the others can be limited with hashcash if necessary

only login should have the rate limit. the others can be limited with hashcash if necessary
clawbot przypisuje to na siebie 2026-03-14 23:16:28 +01:00
Author
Collaborator

Acknowledged — scoping to login endpoint only per sneak's instruction. Session creation and registration can use hashcash if needed. Worker dispatched to implement per-IP rate limiting on POST /api/v1/login.

Acknowledged — scoping to **login endpoint only** per sneak's instruction. Session creation and registration can use hashcash if needed. Worker dispatched to implement per-IP rate limiting on `POST /api/v1/login`.
clawbot usuwa swoje przypisanie 2026-03-17 21:42:01 +01:00
sneak zostaje przypisany(-a) przez clawbot 2026-03-17 21:42:01 +01:00
sneak zamknął(-ęła) to zgłoszenie 2026-03-22 00:39:38 +01:00
Zaloguj się, aby dołączyć do tej rozmowy.
Uczestnicy 2
Powiadomienia
Termin realizacji
Brak ustawionego terminu realizacji.
Zależności

No dependencies set.

Reference: sneak/chat#35