GET /tasks uses credentials from headers instead of the session
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- authentication, backend
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 76
- Avg merge
- 11d 28m
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CCExtractor/ccsync
-
Job-status WebSocket events appear to be broadcast to every connected clientPossibly taken @NaitikVerma6776 claimed this 39 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
CCExtractor/ccsync#473 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
CCExtractor/ccsync#440 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
CCExtractor/ccsync#433 · 4 comments ·
-
Persistent Job Queue & Maintenance Worker for backendPossibly taken @Hell1213 claimed this 320 days ago. Openbackend complex enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
CCExtractor/ccsync#367 · 3 comments ·
-
discussion GSoC
Difficulty 5/5 Over a week Newbie friendliness 15/100
CCExtractor/ccsync#297 · 18 comments · 8 reactions ·
All issues in CCExtractor/ccsync
Similar issues
-
[UI] Guard webApis against undefined window in SSR environmentsPossibly taken @madhavzanwar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
headroomlabs-ai/headroom#4992 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
paperclipai/paperclip#22575 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
lingdojo/kana-dojo#34502 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
bug frontend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
nikhilb2/simple_invoicing#935 ·