GET /tasks uses credentials from headers instead of the session
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- go
- Bereich
- authentication, backend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 36
- Forks
- 76
- Ø Merge
- 11 T. 28 Min.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus CCExtractor/ccsync
-
Job-status WebSocket events appear to be broadcast to every connected clientEvtl. vergeben @NaitikVerma6776 hat das vor 39 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
CCExtractor/ccsync#473 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
CCExtractor/ccsync#440 · 3 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
CCExtractor/ccsync#433 · 4 Kommentare ·
-
Persistent Job Queue & Maintenance Worker for backendEvtl. vergeben @Hell1213 hat das vor 320 Tagen übernommen. Offenbackend complex enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
CCExtractor/ccsync#367 · 3 Kommentare ·
-
discussion GSoC
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
CCExtractor/ccsync#297 · 18 Kommentare · 8 Reaktionen ·
Alle Issues in CCExtractor/ccsync
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Update project links after the repository renamesEvtl. vergeben @JonathanTSilva hat das heute übernommen. Offenai-generated priority: p2 size: xs type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
JonathanTSilva/jts-website#119 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
promplate/code-review#158 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not existEvtl. vergeben @franpts2 hat das heute übernommen. Offendocs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 3 Tagen