[BUG]: Spectators can concede debates and repeatedly modify ratings

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

メンテナーはふだん 20 日以内に返信

@krushna-sahu1 がすでに取り組んでいます。

2026年11月25日 から。

評価

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

調査の方向性

Trace the 1v1 message dispatcher and handleConcede, then inspect the room phase, participant roles, and rating update path. Reproduce the repeated concede from the issue’s WebSocket steps and identify where server-side state can enforce the stated invariant. Done when only a registered non-spectator can concede once during an active debate and repeated or out-of-phase requests cannot change ratings.

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

説明

bug
Bug Description

The 1v1 dispatcher routes the 'concede' message from every client to handleConcede. The handler does not reject spectators, does not check room phase, and does not prevent repeated concedes; it picks any non-spectator as opponent and calls UpdateRatings.

Expected vs actual
  • Expected: The system enforces the invariant described in the remediation below: Accept concede only from a registered non-spectator in an active debate, exactly once, and guard with server-side state.
  • Actual: Rating manipulation and collusion; a single spectator can repeatedly boost another user.
Root cause

The message dispatcher forwards concede from every client, and the handler has no role, phase or duplicate-concede guard.

Steps to Reproduce
  1. Connect to /ws?room=&spectator=true&token=.
  2. Send {'type':'concede'} repeatedly.
  3. Observe rating updates on each call even during setup and even from a spectator account.
Logs and Screenshots
Server logs 'Error updating ratings...' only on failure; successful concedes silently change users.rating. No authorization error is returned.
Environment Details

No response

Impact

High - Major feature is broken

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
主要言語
TypeScript
スター
108
フォーク
266
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

AOSSIE-Org/DebateAI のほかの issue

AOSSIE-Org/DebateAI の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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