GET /tasks uses credentials from headers instead of the session
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 55/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- go
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- TypeScript
- 星號
- 36
- 分支
- 76
- 平均合併
- 11 天 28 分鐘
- 30 天內合併 PR
- 1
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CCExtractor/ccsync 的其他 Issue
-
Job-status WebSocket events appear to be broadcast to every connected client可能已有人在做 @NaitikVerma6776 於 39 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 45/100
CCExtractor/ccsync#473 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 45/100
CCExtractor/ccsync#440 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 25/100
CCExtractor/ccsync#433 · 4 則留言 ·
-
Persistent Job Queue & Maintenance Worker for backend可能已有人在做 @Hell1213 於 320 天前認領。 未關閉backend complex enhancement
難度 5/5 一週以上 新手友好度 35/100
CCExtractor/ccsync#367 · 3 則留言 ·
-
discussion GSoC
難度 5/5 一週以上 新手友好度 15/100
CCExtractor/ccsync#297 · 18 則留言 · 8 個 reaction ·
查看 CCExtractor/ccsync 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 82/100
維護者通常 1 天內回覆
-
Update project links after the repository renames可能已有人在做 @JonathanTSilva 今天認領。 未關閉ai-generated priority: p2 size: xs type: bug
難度 2/5 1-3 小時 新手友好度 85/100
JonathanTSilva/jts-website#119 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 74/100
promplate/code-review#158 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not exist可能已有人在做 @franpts2 今天認領。 未關閉docs
難度 1/5 1 小時以內 新手友好度 90/100
維護者通常 3 天內回覆