Add an endpoint for Biiikes to check whether an email address organizes an event
I maintainer di solito rispondono entro 7 giorni
Nessuno ha ancora preso questa issue.
- #1107 di @gangster — chiusa senza merge
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, php
- Ambito
- api, authorization, backend, security
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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/?
- Lingua principale
- JavaScript
- Stelle
- 30
- Fork
- 26
- Merge medio
- 6g 23h
- PR unite (30g)
- 3
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di shift-org/shift-docs
-
Unknown --db values report a TypeError instead of the intended errorForse già presa @gangster l’ha presa 70 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
shift-org/shift-docs#1091 ·
I maintainer di solito rispondono entro 7 giorni
-
validateRideLength accepts any Object.prototype key as a ride lengthForse già presa @gangster l’ha presa 70 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
shift-org/shift-docs#1089 ·
I maintainer di solito rispondono entro 7 giorni
-
Favorites page fetches every favorite because getDaily's guard is invertedForse già presa @gangster l’ha presa 70 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
shift-org/shift-docs#1087 ·
I maintainer di solito rispondono entro 7 giorni
-
sitemap.xml emits relative <loc> values, so search engines reject itForse già presa @dduugg l’ha presa 96 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
shift-org/shift-docs#1082 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
shift-org/shift-docs#1072 ·
I maintainer di solito rispondono entro 7 giorni
Tutte le issue di shift-org/shift-docs
Issue simili
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.textForse già presa @ManojDevarajulu l’ha presa oggi. Apertapossible bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Mintplex-Labs/anything-llm#6737 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: Tooncast brazil feedApertacheck:passed feeds:add
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 62/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
codex-team/editor.js#3037 ·
-
No Code Attached Yet
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
joomla/joomla-cms#48626 ·
I maintainer di solito rispondono entro 1 giorno
-
complexity: trivial good first issue impact: low
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
ueberdosis/tiptap#8522 ·
I maintainer di solito rispondono entro 1 giorno