[Bug]: Sign-in leaks which usernames exist

Abierto
#105 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
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
graphql, rust

Línea de trabajo

Start at src/api/auth.rs:242 in the signIn resolver and follow the argon2 verification path, then read startPasskeySignIn at src/api/auth.rs:264 and the throttle branch at src/api/subsonic/mod.rs:215. Run the existing auth tests first to see how sign-in responses are asserted. Done means unknown and known usernames take comparable time and return the same shape on all three paths, with a test covering the unknown-user case.

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

Other

What happened?
  • GraphQL signIn returns right away when the username doesn't exist, but runs argon2 when it does (src/api/auth.rs:242), so response time tells them apart.
  • startPasskeySignIn answers differently for "no such account"/"no passkeys" vs. an account with passkeys (src/api/auth.rs:264).
  • In the Subsonic API, unknown usernames spend a throttle guess while known ones using a token don't (src/api/subsonic/mod.rs:215).

With profiles sign-in on, the profile list already shows accounts, but with username sign-in these let anyone list them.

Steps to reproduce

Time signIn with an existing and a made-up username: the made-up one returns much faster.

Expected behavior

Unknown and known usernames take about the same time and get the same answers.

Suggested fix

Verify against a dummy argon2 hash when the account doesn't exist, return a passkey challenge with no allowed credentials (or the same error) for unknown accounts, and throttle the Subsonic paths the same way for both.

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.