Key the application notice per-user limit on the canonical user id

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa 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ệ
postgresql, typescript
Lĩnh vực
authentication, security

Hướng nghiên cứu

Start with the applicationNoticeUserLimiter key generator in src/middleware/applicationNoticeRateLimit.ts, where the raw req.body.userId is used as the bucket key. Compare it with the user lookup that resolves the canonical user.id to see where case normalization fits. Done when case variants of one UUID share a bucket and the limiter store choice is documented or made configurable for multi-instance deployments.

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

Mô tả

P1 security v0.23

Problem

applicationNoticeUserLimiter in src/middleware/applicationNoticeRateLimit.ts keys on the raw req.body.userId. z.uuid() accepts upper-case UUIDs and the Postgres lookup is case-insensitive, so case variants of one id get separate buckets, up to the per-client cap. Both notice limiters use the in-memory store, so each additional API instance multiplies the limits.

Fix

  • key on userId.toLowerCase(), or on the resolved user.id after lookup
  • use the shared rate-limit store when more than one instance runs
Ngôn ngữ chính
TypeScript
Star
2
Fork
2
Merge trung bình
11 giờ 40 phút
Pull request đã merge (30 ngày)
104

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 fells-code/seamless-auth-api

Tất cả issue của fells-code/seamless-auth-api

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.