Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

POST /auth/login reveals account existence, role and lock state

Aperta
#967 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start at the POST /auth/login handler and follow the role, lock-state, and password checks; the issue does not name files or tests. Compare the behavior with the fix for #328 and the later changes in #425 and #494. Done means all login failures return the same 401 message and details, with specific reasons logged server-side and lock information shown only after a correct password.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

backend bug

POST /auth/login returns a different error for each account state, so anyone can tell whether an email is registered, which role it has and whether it's locked, without knowing the password. details says "User not found", "Account locked until …", "Retries exceeded, account locked for …", "User does not have admin privileges" or "User is not a participant", and message changes to "Incorrect Permissions" for the two role cases. Both login pages show details to the user.

#328 fixed this for #226 by returning "Invalid credentials provided" for an unknown email and a wrong password alike. #425 split that check again when it added the role checks, and #494 added the lock checks. Both run before the password check.

Fix: return the same 401 message and details for every login failure, and log the specific reason on the server instead. If a locked user needs to know about the lock, show it only after a correct password. #963 is the same problem on password reset.

Related: #226, #963.

Lingua principale
TypeScript
Stelle
4
Fork
0
Merge medio
14h 50m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Garvan-Data-Science-Platform/ctrl

Tutte le issue di Garvan-Data-Science-Platform/ctrl

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.