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

Abierto
#816 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 20 días

@krushna-sahu1 ya está trabajando en esto.

Desde el 25/11/2026.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
108
Forks
266
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AOSSIE-Org/DebateAI

Todos los issues de AOSSIE-Org/DebateAI

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.