Rate limit unauthenticated /password/generate-reset-link
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- authentication, backend, security
Línea de trabajo
Start in UsersController at POST /users/password/generate-reset-link, then read the /auth/login code that uses retriesRemaining and lockedUntil as the stated pattern. The issue proposes both per-IP throttling and a per-user cooldown, but does not name files or tests; locate the relevant tests and run them. Done means repeated requests are limited by both IP and user without changing normal reset-link behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
POST /users/password/generate-reset-link in UsersController is @NoSecurity() and fires a mail send on every request that matches a real user. No per-IP throttle. No per-user cooldown.
Two things this leaves open:
- Someone who knows a real user's email can mail-bomb the inbox with valid reset links (15-minute TTL each, each writes a
PasswordResetTokenrow). - Someone spamming the endpoint with random emails triggers a mail per matched real user at no cost.
/auth/login already has a per-user retry lock via retriesRemaining and lockedUntil. Same pattern isn't applied here.
Suggested fix
Add both:
- Per-IP throttle via
express-rate-limitor similar — blocks a script hammering the endpoint with random emails regardless of validity. - Per-user cooldown matching the
/auth/loginretry-lock pattern — blocks a distributed attack rotating IPs against one real user's email.
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 0
- Merge medio
- 14 h 50 min
- PR fusionados (30 d)
- 5
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 Garvan-Data-Science-Platform/ctrl
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
-
admin-client backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 comentario ·
-
backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Todos los issues de Garvan-Data-Science-Platform/ctrl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Chocobozzz/PeerTube#7832 ·
Los mantenedores suelen responder en 3 días
-
Pay to use?Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
darkreader/darkreader#16108 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Add: Dak Nong TV SDAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug engine
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
frostney/GocciaScript#1746 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
agilepathway/label-checker#739 · 4 comentarios ·
Los mantenedores suelen responder en 1 día