Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Rate limit unauthenticated /password/generate-reset-link

オープン
#955 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

backend enhancement

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 PasswordResetToken row).
  • 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-limit or similar — blocks a script hammering the endpoint with random emails regardless of validity.
  • Per-user cooldown matching the /auth/login retry-lock pattern — blocks a distributed attack rotating IPs against one real user's email.
主要言語
TypeScript
スター
4
フォーク
0
平均マージ
14時間 50分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Garvan-Data-Science-Platform/ctrl のほかの issue

Garvan-Data-Science-Platform/ctrl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。