Capture all repeated `Cookie` and `Set-Cookie` header values
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 52/100
研究方向
先檢查 OkHttp、Ktor、Apollo 3 和 Apollo 4 整合中現有的 cookie 擷取與 header 存取路徑,然後比較其他 SDK 如何處理重複的 header。在執行整合測試之前,追蹤共用的 cookie 原則以及缺少 Data-Collection 時的行為。完成的標準是:涵蓋重複的 Cookie 和 Set-Cookie 值,且不進行不安全的逗號處理;篩選仍然有效;格式錯誤的值 fail closed。
由索引模型根據 Issue 內容生成。
描述
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
Cookiefields with;before applying the effective cookie policy. - Process each response
Set-Cookiefield independently because each field represents one cookie and its attributes. - Do not comma-join or comma-split
Set-Cookievalues. A validExpiresattribute contains a comma. - Add shared core helpers or integration-specific adapters that apply the effective cookie policy to every value.
- Preserve valid
Set-Cookieattributes 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
Cookiefields are combined with;and filtered as one cookie string. - Multiple response
Set-Cookiefields 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
Cookiefields and two responseSet-Cookiefields where the underlying header API supports repeated values.
- 主要語言
- Kotlin
- 星號
- 1.4k
- 分支
- 478
- 平均合併
- 2 天 20 小時
- 30 天內合併 PR
- 71
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-java 的其他 Issue
-
Improvement Java Platform: Android Platform: Java
難度 2/5 1-3 小時 新手友好度 75/100
getsentry/sentry-java#6145 · 1 則留言 · 已指派 1 人 ·
-
Bug Java Platform: Android Platform: Java
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-java#6138 · 1 則留言 ·
-
Feature Java Platform: Java Spans
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-java#5984 · 1 則留言 ·
-
Android Task Traces
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-java#5376 · 1 則留言 ·
-
Android Docs Errors
難度 2/5 1-3 小時 新手友好度 64/100
getsentry/sentry-java#5375 · 1 則留言 ·
查看 getsentry/sentry-java 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
AAswordman/Operit#1265 · 3 則留言 ·
-
Source is down
難度 2/5 1-3 小時 新手友好度 70/100
keiyoushi/extensions-source#19317 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
acristescu/OnlineGo#216 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
libre-tube/LibreTube#8803 ·
-
難度 2/5 1-3 小時 新手友好度 75/100