[Bug]: Sign-in leaks which usernames exist
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- graphql, rust
- Domaine
- authentication, backend, security
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
[!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
signInreturns 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. startPasskeySignInanswers 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.
- Langage dominant
- TypeScript
- Étoiles
- 4
- Forks
- 1
- Merge moyen
- 4 h 49 min
- PR mergées (30 j)
- 5
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de tinystream-dev/tinystream
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
tinystream-dev/tinystream#132 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
tinystream-dev/tinystream#131 ·
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
tinystream-dev/tinystream#129 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
tinystream-dev/tinystream#128 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
tinystream-dev/tinystream#124 ·
Toutes les issues de tinystream-dev/tinystream
Issues similaires
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 86/100
sandbox-quantum/switch#2163 ·
Les mainteneurs répondent en général sous 1 jour
-
automated issue report
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
area/dashboard kind/bug QA/dev-automation
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
bug pydanty:is-working
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
pydantic/pydantic-ai#13939 ·
Les mainteneurs répondent en général sous 1 jour
-
self-host
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
funmusicplace/mirlo#2625 ·
Les mainteneurs répondent en général sous 1 jour