GET /tasks uses credentials from headers instead of the session
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- authentication, backend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 36
- Fork
- 76
- Merge medio
- 11g 28m
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CCExtractor/ccsync
-
Job-status WebSocket events appear to be broadcast to every connected clientForse già presa @NaitikVerma6776 l’ha presa 39 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
CCExtractor/ccsync#473 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
CCExtractor/ccsync#440 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
CCExtractor/ccsync#433 · 4 commenti ·
-
Persistent Job Queue & Maintenance Worker for backendForse già presa @Hell1213 l’ha presa 320 giorni fa. Apertabackend complex enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
CCExtractor/ccsync#367 · 3 commenti ·
-
discussion GSoC
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
CCExtractor/ccsync#297 · 18 commenti · 8 reazioni ·
Tutte le issue di CCExtractor/ccsync
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Update project links after the repository renamesForse già presa @JonathanTSilva l’ha presa oggi. Apertaai-generated priority: p2 size: xs type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
JonathanTSilva/jts-website#119 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
promplate/code-review#158 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not existForse già presa @franpts2 l’ha presa oggi. Apertadocs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 3 giorni