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

GET /organisations/{orgID}/users returns password hash and emailHash

Aperta Adatta ai principianti
#966 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend, security

Direzione di ricerca

Leggi OrganisationsController.ts e individua getOrganisationUsers, che usa include: { users: true }; per avere il contesto, esamina le correzioni correlate in #878 e #926. Aggiungi un test che verifichi che password e emailHash siano assenti dalla risposta di questa route. Poi verifica che l’inclusione degli utenti ometta entrambi i campi ed esegui i test pertinenti.

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

Descrizione

backend bug

GET /organisations/{orgID}/users returns every column of each user in the organisation, including the stored password hash and emailHash, so any OrganisationAdmin can read them.

getOrganisationUsers in OrganisationsController.ts uses include: { users: true } with no omit. #878 and #926 fixed the same leak on the /users routes, but this route was missed. The handler also logs the full response, which #943 already covers.

Fix: include: { users: { omit: { password: true, emailHash: true } } }, plus a test that asserts both fields are absent. If #937 lands first, its UserResponse[] response type leaves both fields out of the type but not out of the response, so the omit is still needed.

Related: #921, #922, #943, #937.

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.