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

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

Đang mở
#967 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
authentication

Hướng nghiên cứu

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.

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

Mô tả

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.

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.