feat(api): add per-actor rate limit on POST /events/submit (and future /forms, /announcements submit)
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ó
- 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
- 45/100
Hướng nghiên cứu
Start at the authenticated POST /events/submit handler and review how the project runs requests at the Worker layer. Compare the listed Workers Rate Limiting API, KV-backed counter, and Postgres-backed counter options, then identify the existing unit-test setup. Done means a composable per-actor limit, 429 responses with Retry-After, and a test covering the cap.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
POST /events/submit is auth-gated but unbounded — a single member could enqueue arbitrary draft events into the staff review queue. Same concern will apply to future member-facing submission endpoints in Plans 4 and 5.
Requirements
- Decide a sensible cap (e.g., 10 submissions per actor per 24h)
- Implement per-actor rate limit middleware that applies to
POST /events/submit - Surface rate-limit-exceeded as
429 Too Many Requestswith aRetry-Afterheader - Add unit test covering the cap
- Make the middleware composable so future submission endpoints (Plans 4 + 5) can opt in
Context
Flagged in the Plan 2 review. Rate limiting is best done at the Worker layer (e.g., Cloudflare Workers KV or Durable Object). Plan 4 (forms) and Plan 5 (announcements/broadcast) will benefit from the same primitive.
Implementation Notes
Options:
- Cloudflare Workers Rate Limiting API (built-in, easy)
- KV-backed counter with TTL (cheap, works on the existing stack)
- Postgres-backed counter (consistent but adds DB hops to every submit)
Workers Rate Limiting API is the YAGNI default unless we need cross-region consistency.
- Ngôn ngữ chính
- HTML
- Star
- 33
- Fork
- 107
- Merge trung bình
- 14 giờ 6 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của USRSE/usrse.github.io
-
update community awardsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
USRSE/usrse.github.io#2117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 63/100
USRSE/usrse.github.io#2115 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken URLs on the websiteĐang mởbroken-links
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
USRSE/usrse.github.io#2099 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
USRSE/usrse.github.io#2085 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
USRSE/usrse.github.io#2001 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của USRSE/usrse.github.io
Issue tương tự
-
Calc 1.1: inconsistent duplicate facts with equal `decimals` don't stop the calculation checkĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rubenarslan/formr#63 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
StreamPipe input stream: readWithTimeout(n, 0) blocks forever instead of returning immediatelyĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
qoretechnologies/qore#8159 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày