Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#931 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
authentication

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
4
Fork
0
Merge trung bình
14 giờ 50 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Garvan-Data-Science-Platform/ctrl

Tất cả issue của Garvan-Data-Science-Platform/ctrl

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.