Add an endpoint for Biiikes to check whether an email address organizes an event
Los mantenedores suelen responder en 7 días
Nadie ha tomado este issue todavía.
- #1107 de @gangster — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, php
- Área
- api, authorization, backend, security
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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/?
- Lenguaje dominante
- JavaScript
- Estrellas
- 30
- Forks
- 26
- Merge medio
- 6 d 23 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de shift-org/shift-docs
-
Unknown --db values report a TypeError instead of the intended errorPosiblemente ocupada @gangster la tomó hace 70 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
shift-org/shift-docs#1091 ·
Los mantenedores suelen responder en 7 días
-
validateRideLength accepts any Object.prototype key as a ride lengthPosiblemente ocupada @gangster la tomó hace 70 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
shift-org/shift-docs#1089 ·
Los mantenedores suelen responder en 7 días
-
Favorites page fetches every favorite because getDaily's guard is invertedPosiblemente ocupada @gangster la tomó hace 70 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
shift-org/shift-docs#1087 ·
Los mantenedores suelen responder en 7 días
-
sitemap.xml emits relative <loc> values, so search engines reject itPosiblemente ocupada @dduugg la tomó hace 96 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
shift-org/shift-docs#1082 ·
Los mantenedores suelen responder en 7 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
shift-org/shift-docs#1072 ·
Los mantenedores suelen responder en 7 días
Todos los issues de shift-org/shift-docs
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 8 días
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkAbiertofactory-active task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
vercel/ai#23375 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
feature request
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
docs hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
pacocartones/free-llm-api-hub#347 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
wpilibsuite/wpilib-docs#3378 ·
Los mantenedores suelen responder en 1 día