Reject bingo toggle requests for tiles outside the user's current card
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- authorization, backend
調査の方向性
src/routes/bingo/+page.server.ts から始めて、toggle を追跡し、caller の現在の seed 付きカードがどのように構築されるかを確認してから、src/lib/server/standings.ts と loadStandings を調べます。カードに存在しないタイル ID によって進捗を作成または削除できないこと、free space が引き続き no-op であること、そして standings が現在のカードに対する進捗だけをカウントするか、選択された pool 変更時の動作を適用することを検証します。
索引モデルが issue の本文から書いたものです。
説明
Problem
toggle verifies that a supplied tile ID exists and is active, but never verifies that the tile is one of the caller current seeded card tiles. Any authenticated user can POST an arbitrary active tileId from the global pool to ?/toggle; a bingo_progress row is inserted and a completion activity is logged.
This is visible in standings because loadStandings uses completedIds.size, which counts every progress row, not just IDs on the displayed card. It also lets players pre-mark tiles that may appear after later pool changes.
Reproduction
- Configure more tiles than a single card uses.
- Sign in and obtain the ID of an active tile that is not on the rendered card.
- Submit
POST /bingo?/togglewith that ID. - The request succeeds despite no corresponding tile being available to the player; the activity log and leaderboard progress increase.
Suggested fix
Build the caller current seeded card before insertion or removal and return 400 or 403 unless the requested ID is in it (free space remains a no-op). Count only current-card progress in standings, or deliberately clear or migrate off-card progress when the pool changes.
Affected code
src/routes/bingo/+page.server.tssrc/lib/server/standings.ts
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hacksu/bingo のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·