GET /tasks uses credentials from headers instead of the session
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- authentication, backend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 36
- Forks
- 76
- Merge medio
- 11 d 28 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CCExtractor/ccsync
-
Job-status WebSocket events appear to be broadcast to every connected clientPosiblemente ocupada @NaitikVerma6776 la tomó hace 39 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
CCExtractor/ccsync#473 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
CCExtractor/ccsync#440 · 3 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
CCExtractor/ccsync#433 · 4 comentarios ·
-
Persistent Job Queue & Maintenance Worker for backendPosiblemente ocupada @Hell1213 la tomó hace 320 días. Abiertobackend complex enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
CCExtractor/ccsync#367 · 3 comentarios ·
-
discussion GSoC
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
CCExtractor/ccsync#297 · 18 comentarios · 8 reacciones ·
Todos los issues de CCExtractor/ccsync
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Update project links after the repository renamesPosiblemente ocupada @JonathanTSilva la tomó hoy. Abiertoai-generated priority: p2 size: xs type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
JonathanTSilva/jts-website#119 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
promplate/code-review#158 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not existPosiblemente ocupada @franpts2 la tomó hoy. Abiertodocs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 3 días