Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Remove the v1 user routes and keep complete simulation and report results final

Đang mở
#4,028 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@MaxGhenis đang làm issue này rồi.

Từ ngày 23/10/2026.

  • #4029 của @MaxGhenis — đang mở

Đá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
45/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ệ
python
Lĩnh vực
api, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The 2026-10-22 security review of the deployed API found two authorization gaps in v1 routes.

  1. 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 a user_id, auth0_id or record id taken 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 /v2 routes, which take the owner from the verified credential.
  2. Result updates. PATCH /{country_id}/simulation and PATCH /{country_id}/report take 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.
Ngôn ngữ chính
Python
Star
18
Fork
33
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
36

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/policyengine-api

Tất cả issue của PolicyEngine/policyengine-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.