GET /tasks uses credentials from headers instead of the session
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Start from the AuthMiddleware wiring and the GET /tasks handler described in main.go, then read the referenced #338 discussion to see whether the mobile-app exception is meant to cover this route. Reproduce with a small Go test using the same AuthMiddleware → TasksHandler chain and a session for user A plus user B's X-User-* headers. Done means /tasks uses the session credentials like the POST endpoints and a test covers the mismatched-header case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
After #408, AuthMiddleware overwrites email, UUID and encryptionSecret with the session values, but only for POST bodies. GET /tasks still reads them from the X-User-Email, X-User-UUID and X-Encryption-Secret headers, which the middleware doesn't touch. So whatever the client sends is used, even if it doesn't match the logged-in user.
To Reproduce
- Log in as user A.
- Call
GET /taskswith user B's values in theX-User-*headers. - It returns 200 and the fetch runs with user B's credentials.
I checked this with a small Go test using the same wiring as main.go (AuthMiddleware → TasksHandler).
Expected behavior
/tasks should use the session credentials, same as the POST endpoints.
Additional context
A possible fix is to set the X-User-* headers from the session in AuthMiddleware for GET requests. I know from #338 that some of this is intentional for the mobile app, so I wanted to check first: should /tasks follow the same rule as the other endpoints? Happy to open a PR if so.
- Ngôn ngữ chính
- TypeScript
- Star
- 36
- Fork
- 76
- Merge trung bình
- 11 ngày 28 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọ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 CCExtractor/ccsync
-
Job-status WebSocket events appear to be broadcast to every connected clientCó thể đã có người làm @NaitikVerma6776 đã nhận 39 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
CCExtractor/ccsync#473 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
CCExtractor/ccsync#440 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
CCExtractor/ccsync#433 · 4 bình luận ·
-
Persistent Job Queue & Maintenance Worker for backendCó thể đã có người làm @Hell1213 đã nhận 320 ngày trước. Đang mởbackend complex enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
CCExtractor/ccsync#367 · 3 bình luận ·
-
discussion GSoC
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
CCExtractor/ccsync#297 · 18 bình luận · 8 reaction ·
Tất cả issue của CCExtractor/ccsync
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Update project links after the repository renamesCó thể đã có người làm @JonathanTSilva đã nhận hôm nay. Đang mởai-generated priority: p2 size: xs type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
JonathanTSilva/jts-website#119 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
promplate/code-review#158 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not existCó thể đã có người làm @franpts2 đã nhận hôm nay. Đang mởdocs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 3 ngày