Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Capture all repeated `Cookie` and `Set-Cookie` header values

Abierto
#5,982 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, kotlin
Área
api, security, testing

Línea de trabajo

Empieza inspeccionando las rutas existentes de extracción de cookies y acceso a headers en las integraciones de OkHttp, Ktor, Apollo 3 y Apollo 4; después, compara cómo otros SDKs gestionan los headers repetidos. Rastrea la política de cookies compartida y el comportamiento cuando falta Data-Collection antes de ejecutar las pruebas de integración. Se considera terminado cuando los valores repetidos de Cookie y Set-Cookie están cubiertos sin un manejo inseguro de las comas, el filtrado sigue siendo efectivo y los valores malformados fallan de forma segura.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Feature Java Platform: Java

Problem

The OkHttp, Ktor, and Apollo integrations capture only one Cookie or Set-Cookie header value when creating request and response contexts. Their current header accessors select a single value, so additional cookie fields are omitted from Sentry telemetry.

This is valid HTTP behavior. In particular, HTTP/2 allows clients to split the Cookie field into multiple header fields for compression. Responses also commonly contain multiple Set-Cookie fields.

This is follow-up completeness work from #5811 and supports #5666.

Check what other SDKs are doing before implementing.

Proposed solution

Make cookie extraction list-aware across OkHttp, Ktor, Apollo 3, and Apollo 4:

  • Combine repeated request Cookie fields with ; before applying the effective cookie policy.
  • Process each response Set-Cookie field independently because each field represents one cookie and its attributes.
  • Do not comma-join or comma-split Set-Cookie values. A valid Expires attribute contains a comma.
  • Add shared core helpers or integration-specific adapters that apply the effective cookie policy to every value.
  • Preserve valid Set-Cookie attributes and fail closed for malformed input.

Preserve the existing absent-Data-Collection compatibility behavior for each integration.

Acceptance criteria

  • OkHttp, Ktor, Apollo 3, and Apollo 4 capture all repeated cookie header values supported by their header APIs.
  • Multiple request Cookie fields are combined with ; and filtered as one cookie string.
  • Multiple response Set-Cookie fields are filtered independently without comma splitting or joining.
  • Built-in sensitive-cookie filtering and configured allow-list, deny-list, and off behavior apply to every cookie value.
  • Malformed cookie values never bypass filtering.
  • Integration tests cover at least two request Cookie fields and two response Set-Cookie fields where the underlying header API supports repeated values.
Lenguaje dominante
Kotlin
Estrellas
1.4k
Forks
478
Merge medio
2 d 20 h
PR fusionados (30 d)
71

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/sentry-java

Todos los issues de getsentry/sentry-java

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.