GET /tasks uses credentials from headers instead of the session
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 55/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- go
- Domaine
- authentication, backend
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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.
- Langage dominant
- TypeScript
- Étoiles
- 36
- Forks
- 76
- Merge moyen
- 11 j 28 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de CCExtractor/ccsync
-
Job-status WebSocket events appear to be broadcast to every connected clientPeut-être pris @NaitikVerma6776 l’a pris il y a 39 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
CCExtractor/ccsync#473 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
CCExtractor/ccsync#440 · 3 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
CCExtractor/ccsync#433 · 4 commentaires ·
-
Persistent Job Queue & Maintenance Worker for backendPeut-être pris @Hell1213 l’a pris il y a 320 jours. Ouvertebackend complex enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
CCExtractor/ccsync#367 · 3 commentaires ·
-
discussion GSoC
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
CCExtractor/ccsync#297 · 18 commentaires · 8 réactions ·
Toutes les issues de CCExtractor/ccsync
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Update project links after the repository renamesPeut-être pris @JonathanTSilva l’a pris aujourd’hui. Ouverteai-generated priority: p2 size: xs type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
JonathanTSilva/jts-website#119 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
promplate/code-review#158 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not existPeut-être pris @franpts2 l’a pris aujourd’hui. Ouvertedocs
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
Les mainteneurs répondent en général sous 3 jours