Add an endpoint for Biiikes to check whether an email address organizes an event
Maintainer thường phản hồi trong vòng 7 ngày
Chưa có ai nhận issue này.
- #1107 của @gangster — đã đóng, không merge
Đá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
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, php
- Lĩnh vực
- api, authorization, backend, security
Hướng nghiên cứu
Start with events.php and the proposed api/biiikes_match.php, plus the delete_test.js test style and CALENDAR_API.md. The two open questions (endpoint naming and base URL) need a maintainer decision before code, and the auth, rate-limit and timing requirements need careful design. Done means maintainers answer those questions, and the endpoint returns the specified yes/no responses with tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Biiikes (biiikes.com) is a Portland group-ride calendar that imports Shift's public events through events.php. An imported ride has no owner on our side. When a ride leader wants to manage their ride on Biiikes, we need to confirm they really are that event's organizer, without Shift ever giving us organizer email addresses.
Proposal
A small, read-only endpoint that answers one question: does this email address belong to this event's organizer?
POST /api/biiikes_match.php
Authorization: Bearer <token>
Content-Type: application/json
{"series_id": "1234", "email": "[email protected]"}
200 {"leads": true} the event exists, is published, isn't deleted, and its organizer email matches
200 {"leads": false} everything else
- The leader types their email address into Biiikes. Only that address is sent, and only a yes or no comes back. Shift never sends us its addresses.
- Biiikes sends the confirmation email to the leader itself. Shift sends no mail, and nothing about Shift's mail or templates changes.
- No schema change, no new state, no new dependency.
Privacy and abuse
This endpoint can be used to test whether an address organizes a given event, so it needs limits:
- Off by default. It answers
404until an admin setsBIIIKES_MATCH_TOKENSon the server, and it needs a bearer token. Revoking access means removing the token. - A per-token ceiling on Shift's side. About 100 requests an hour (
BIIIKES_MATCH_PER_HOUR), answering429past it. - "No" looks the same every time. A wrong address, an unknown id, an unpublished event and a deleted event all get the same reply, in the same time, so it can't be used to discover events.
- Addresses aren't logged. They're never logged or echoed, including on malformed requests. It's a POST body, never a query string, so addresses stay out of access logs.
- Biiikes limits before it calls. Five wrong addresses per device and then an hour's lockout, three confirmation emails per address per day, and at most 50 wrong addresses per event per hour.
Implementation
I have a branch ready, with tests in the style of delete_test.js and docs in CALENDAR_API.md: about 90 lines of endpoint code, plus tests and docs. I'm happy to open the PR against this issue, and to rename or reshape anything to fit how you'd like it.
Questions for maintainers:
- Is a partner-specific endpoint OK, or would you prefer a general name that other approved callers could use?
- Which base URL should a server-to-server caller use:
www.shift2bikes.org/api/orapi.shift2bikes.org/api/?
- Ngôn ngữ chính
- JavaScript
- Star
- 30
- Fork
- 26
- Merge trung bình
- 6 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không 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 shift-org/shift-docs
-
Unknown --db values report a TypeError instead of the intended errorCó thể đã có người làm @gangster đã nhận 71 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
shift-org/shift-docs#1091 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
validateRideLength accepts any Object.prototype key as a ride lengthCó thể đã có người làm @gangster đã nhận 71 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
shift-org/shift-docs#1089 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Favorites page fetches every favorite because getDaily's guard is invertedCó thể đã có người làm @gangster đã nhận 71 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
shift-org/shift-docs#1087 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
sitemap.xml emits relative <loc> values, so search engines reject itCó thể đã có người làm @dduugg đã nhận 97 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
shift-org/shift-docs#1082 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
shift-org/shift-docs#1072 ·
Maintainer thường phản hồi trong vòng 7 ngày
Tất cả issue của shift-org/shift-docs
Issue tương tự
-
area:install bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
yetone/magpie#2406 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.textCó thể đã có người làm @ManojDevarajulu đã nhận hôm nay. Đang mởpossible bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Mintplex-Labs/anything-llm#6737 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Tooncast brazil feedĐang mởcheck:passed feeds:add
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 62/100
-
Remove the dead tree 'loadfail' handler in browser.js, which calls a non-existent tree.isSelected()Đang mởHousekeeping
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pgadmin-org/pgadmin4#10601 ·
Maintainer thường phản hồi trong vòng 1 ngày