Skip to content

fix(core): [Remove sendDefaultPii 2] Omit empty cookie headers - #6799

Merged
adinauer merged 5 commits into
9.x.xfrom
fix/remove-send-default-pii-v9-empty-cookies
Nov 30, 2026
Merged

adinauer merged 5 commits into
9.x.xfrom
fix/remove-send-default-pii-v9-empty-cookies

Conversation

@adinauer

@adinauer adinauer commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Remove sendDefaultPii)


📜 Description

Return null when cookie-header filtering produces no values. Request integrations then omit the cookies field instead of serializing it as an empty string when a request has no cookie headers.

All current SDK callers already handle a nullable filtered result, so no integration-specific fallback is needed.

💡 Motivation and Context

The removal of sendDefaultPii makes cookie filtering run consistently across Servlet and Spring request integrations. For requests without cookie headers, the shared helper previously returned an empty list, which callers joined into Request.cookies = "".

Omitting the field accurately represents the absence of cookie data and avoids passing an empty collection into callers that expect either values or null.

💚 How did you test it?

  • Added tests for empty cookie-header lists and enumerations.
  • Ran focused core, Servlet, and Spring request integration tests.
  • Ran make format api.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

None.

⚠️ Merge this PR into #6793 using a merge commit (not squash). Then squash-merge #6793 into 9.x.x.

Return null when cookie-header filtering produces no values so request payloads omit the cookies field instead of serializing an empty string.

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 0808190.

Main concerns: reach, data sent to Sentry.

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.66.0 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 27, 2026
@adinauer
adinauer marked this pull request as ready for review November 27, 2026 12:29
@adinauer
adinauer requested a review from a team as a code owner November 27, 2026 12:29
@adinauer
adinauer requested review from 0xadam-brown and romtsn and removed request for a team November 27, 2026 12:29
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 27, 2026
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 30, 2026
Allocate the filtered cookie header list only when a header is retained. This preserves the nullable result while avoiding an empty list allocation.

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 30, 2026
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 30, 2026
Base automatically changed from ref/remove-send-default-pii-v9 to 9.x.x November 30, 2026 16:28
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 30, 2026
@adinauer
adinauer merged commit 6352f7f into 9.x.x Nov 30, 2026
44 checks passed
@adinauer
adinauer deleted the fix/remove-send-default-pii-v9-empty-cookies branch November 30, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants