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

Emails freed up by an admin email change can be reassigned to a new user (no history tracking)

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
typescript

Direzione di ricerca

Start by reading UsersController.createUser around lines 187–197, then compare the email-change paths in UsersController.updateUser and ProfilesController.updateProfileById. This issue asks the team to decide whether email history should prevent reuse outright, enforce a cooldown, or remain a known trade-off; implementation and a definition of done depend on that decision.

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

Descrizione

backend question

UsersController.createUser checks for duplicate emails against current and soft-deleted users:

  • count({ where: { email, deleted: true } }) triggers "This email belongs to a deleted user, you must restore the user instead of creating a new one"
  • count({ where: { email } }) triggers "Email already exists"

There's no history table or history check. If an admin changes User A's email from [email protected] to [email protected] via UsersController.updateUser or ProfilesController.updateProfileById, [email protected] becomes fully free to reassign to a new User B via create-user or invite. Delete already handles this correctly via soft-delete, but change does not — deleted users keep their emailHash reserved, changed users release it.

Consequence: if User A still has access to that mailbox they'll receive emails intended for the new User B (registration link, reset link, notifications). Password-reset links for the old address become invalid, but any pending or previously-received emails are still readable. Social engineering and info-leak vector.

Auth0 and similar providers keep an email-history table specifically to prevent this. Modern guidance is split on whether to block reuse outright or allow it after a cooldown (e.g. 90 days), so filing as a question — worth a team decision on whether we want history enforcement in the health context, or whether accepting the current behaviour as a known trade-off is fine.

Related to #929 which is about notification on email change, and #928 on reset completion.

Related files: UsersController.createUser (lines ~187-197), UsersController.updateUser, ProfilesController.updateProfileById.

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.