Remove the v1 user routes and keep complete simulation and report results final
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start by locating the v1 user-profile and user-policy route definitions and the PATCH handlers for simulation and report; the issue gives no file or test names. Read how those handlers authorize requests and determine whether a stored result is complete. Done means the legacy routes are removed and updates to complete results are accepted unchanged when identical or rejected with 409 when they differ; run the relevant API tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The 2026-10-22 security review of the deployed API found two authorization gaps in v1 routes.
- Legacy user routes.
/{country_id}/user-profile(GET, POST, PUT) and/{country_id}/user-policy(GET, POST, PUT) read and change user profiles and saved policies by auser_id,auth0_idor recordidtaken from the request, and check no credential. App v2 does not call them, and #4017 reports no production requests to them in the 30 days to 2026-10-19. Signed-in users' saved work is served by the/v2routes, which take the owner from the verified credential. - Result updates.
PATCH /{country_id}/simulationandPATCH /{country_id}/reporttake no credential and can replace a result that is already complete. These records are shared (identical requests reuse one record), so one caller's update changes what every viewer of that record sees.
Plan:
- Remove the v1 user routes. #4017 removes them too, but it is held for the legacy site's shutdown because of the other routes it removes.
- Make a complete result final: an update that repeats it is accepted and changes nothing, and one that would change it answers 409. Today the browser that ran the calculation writes its result, so there is no compute-worker credential to require; making the server the only writer of results is a follow-up.
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 33
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 56
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 PolicyEngine/policyengine-api
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
PolicyEngine/policyengine-api#4037 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
PolicyEngine/policyengine-api#3911 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
PolicyEngine/policyengine-api#3910 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
PolicyEngine/policyengine-api#4107 ·
Los mantenedores suelen responder en 2 días
-
Drop the unused x and y columns from API v2's UK area impact tablesPosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
PolicyEngine/policyengine-api#4102 ·
Los mantenedores suelen responder en 2 días
Todos los issues de PolicyEngine/policyengine-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
btclib-org/btclib-ecc#404 ·
-
changelog investigate
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
ramnes/notion-sdk-py#430 ·
-
bug good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
hyeonjoong/debussy#56 ·
-
README устарел: статус проекта, версия 0.1.0 при описании тега v0.1.1, семантика фолбэка поискаAbiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Lagrunge82/yandex-mail-mcp#43 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
liberation-data/drivine-python#252 · 1 comentario ·
Los mantenedores suelen responder en 1 día