[Bug]: Room invites from any member and in-memory maps that only clean up on insert

Abierto
#117 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend, security

Línea de trabajo

Two separate fixes. Start with src/api/together.rs, the Command::Invite handler: read how host/permission state is tracked for a room, then decide the smallest rule that lets the host (and only the host) invite, plus a bound on the invited list. Then open src/auth/passkeys.rs around line 25 to see how the challenge map is keyed and where entries are added, and add a sweep or a size cap. Done means an unprivileged member can no longer invite, and repeated startPasskeySignIn calls cannot grow the map without bound; a security-sensitive change like this will need a maintainer's review of the chosen policy.

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

Descripción

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

Streaming / playback

What happened?
  • Anyone in a watch-together or listening room with the watch_together permission can invite any user id (src/api/together.rs Command::Invite), including people who got into the room through library access rather than as host. Invites grant access to that room's title even to users who can't see its library, so this hands out access the host didn't choose. The invited list also has no limit.
  • Passkey challenges (src/auth/passkeys.rs:25) only drop expired entries when a new one is added. startPasskeySignIn needs no sign-in, so a flood of requests for an account with passkeys keeps up to 5 minutes' worth of challenges in memory.
Expected behavior

Only the host (or whoever the host allows) can invite, and unauthenticated requests can't grow server memory without bound.

Suggested fix

Restrict Invite to the host (or members the host allows), cap invited, and cap the challenge map size (or sweep it on a timer).

Lenguaje dominante
TypeScript
Estrellas
4
Forks
1
Merge medio
4 h 49 min
PR fusionados (30 d)
5

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

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 tinystream-dev/tinystream

Todos los issues de tinystream-dev/tinystream

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.