feat(api): add per-actor rate limit on POST /events/submit (and future /forms, /announcements submit)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start at the authenticated POST /events/submit handler and review how the project runs requests at the Worker layer. Compare the listed Workers Rate Limiting API, KV-backed counter, and Postgres-backed counter options, then identify the existing unit-test setup. Done means a composable per-actor limit, 429 responses with Retry-After, and a test covering the cap.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
POST /events/submit is auth-gated but unbounded — a single member could enqueue arbitrary draft events into the staff review queue. Same concern will apply to future member-facing submission endpoints in Plans 4 and 5.
Requirements
- Decide a sensible cap (e.g., 10 submissions per actor per 24h)
- Implement per-actor rate limit middleware that applies to
POST /events/submit - Surface rate-limit-exceeded as
429 Too Many Requestswith aRetry-Afterheader - Add unit test covering the cap
- Make the middleware composable so future submission endpoints (Plans 4 + 5) can opt in
Context
Flagged in the Plan 2 review. Rate limiting is best done at the Worker layer (e.g., Cloudflare Workers KV or Durable Object). Plan 4 (forms) and Plan 5 (announcements/broadcast) will benefit from the same primitive.
Implementation Notes
Options:
- Cloudflare Workers Rate Limiting API (built-in, easy)
- KV-backed counter with TTL (cheap, works on the existing stack)
- Postgres-backed counter (consistent but adds DB hops to every submit)
Workers Rate Limiting API is the YAGNI default unless we need cross-region consistency.
- Lenguaje dominante
- HTML
- Estrellas
- 33
- Forks
- 107
- Merge medio
- 14 h 6 min
- PR fusionados (30 d)
- 19
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de USRSE/usrse.github.io
-
update community awardsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
USRSE/usrse.github.io#2117 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 63/100
USRSE/usrse.github.io#2115 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Broken URLs on the websiteAbiertobroken-links
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
USRSE/usrse.github.io#2099 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
USRSE/usrse.github.io#2085 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
USRSE/usrse.github.io#2001 ·
Los mantenedores suelen responder en 1 día
Todos los issues de USRSE/usrse.github.io
Issues similares
-
Calc 1.1: inconsistent duplicate facts with equal `decimals` don't stop the calculation checkAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
rubenarslan/formr#63 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
StreamPipe input stream: readWithTimeout(n, 0) blocks forever instead of returning immediatelyAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
qoretechnologies/qore#8159 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día