[Bug]: Clip rate limiter counts each IPv6 address separately

オープン 初心者向け
#122 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

まず src/api/clips.rs の1953行目付近にあるレート制限キーの生成を確認し、次に auth::throttle::key を読んで、パスワードのスロットリングでIPv6を/64にマスクする方法を確認します。このヘルパーを pub(crate) にし、クリップのバケットに使用して、クライアントがプレフィックス内のアドレス間でリクエストを分散できないようにします。既存のスロットリングテストを見て、パターンを参考にしてください。同じ/64内の2つのIPv6アドレスが1つのバケットに入れば完了です。

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

説明

bug

[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a code review session with @PhrolovaMoe. It was found by reading the code and hasn't been reproduced on a running server.

Version

0.40.0 (feat/desktop, 017a837b)

Area

Clips

What happened?

The public clip rate limiter keys on the full client address (src/api/clips.rs:1953). The password throttle groups IPv6 by /64 (auth::throttle::key) because people usually have the whole /64, so here one client can spread requests over many addresses.

Expected behavior

IPv6 clients are limited per /64, like the password throttle.

Suggested fix

Reuse throttle::key (make it pub(crate)) for the clip buckets.

主要言語
TypeScript
スター
4
フォーク
1
平均マージ
4時間 49分
マージ済み PR(30日)
5

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

tinystream-dev/tinystream のほかの issue

tinystream-dev/tinystream の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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