Skip to content

docs(data-collection): Gate URL fragments behind urlQueryParams - #20904

Merged
chargome merged 1 commit into
masterfrom
charly/data-collection-url-fragment
Nov 23, 2026
Merged

chargome merged 1 commit into
masterfrom
charly/data-collection-url-fragment

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

The data collection spec says what urlQueryParams does to query strings, but it doesn't mention URL fragments. Fragments can carry the same secrets. OAuth and OpenID Connect login redirects can return tokens in the fragment (#access_token=...), and apps with hash-based routing put their query string there (#/callback?token=...).

This PR puts the fragment under urlQueryParams (spec 0.19.0):

  • When urlQueryParams is off, SDKs MUST NOT collect the fragment and MUST remove it from every URL they attach (url.full, http.fragment, request.url, breadcrumb data).
  • Otherwise, SDKs apply the urlQueryParams rules and terms to key=value pairs in the fragment, the same way they do for query params. When the fragment contains a ?, the pairs come after the first ?. Text outside a key=value pair, such as #details or #/settings, is kept as-is.
  • Adds an example for a login redirect, updates the urlQueryParams row in the options table, and adds a changelog entry.

Open decisions

  • Anchors without =: this draft keeps them as-is so #details-style anchors stay useful for debugging. Cookies take the stricter route: a nameless segment is always [Filtered]. Should fragments do the same?
  • code isn't on the sensitive denylist: OAuth authorization-code redirects (?code=... or #code=...) aren't scrubbed by the default denylist. --> we will add that to the default list

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

via @chargome.

--

View Session [Sentry]

Co-Authored-By: Charly Gomez <20254395+chargome@users.noreply.github.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Nov 19, 2026 9:28am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-docs Ignored Ignored Nov 19, 2026 9:28am UTC

Request Review

@github-actions github-actions Bot added sdk-develop-docs PRs touching develop-docs/sdk Priority: Normal Docs review has no urgent deadline labels Nov 19, 2026
@chargome
chargome marked this pull request as ready for review November 19, 2026 09:43
@sentry-junior
sentry-junior Bot requested a review from chargome November 19, 2026 09:43
@cursor

cursor Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Getting ready to monitor this change · Rollout details

Status Service Environment
⏳ Getting ready to monitor this change

@chargome
chargome merged commit c76cb1d into master Nov 23, 2026
36 checks passed
@chargome
chargome deleted the charly/data-collection-url-fragment branch November 23, 2026 09:40
chargome added a commit that referenced this pull request Nov 23, 2026
## DESCRIBE YOUR PR

OAuth authorization codes and similar one-time codes (`?code=...`) can
be exchanged for credentials, but none of the current sensitive denylist
terms match `code`. The SDKs therefore send these values in plaintext by
default.

This PR adds `code` to the sensitive denylist in the data collection
spec and bumps the spec to 0.20.0.

The denylist uses partial matching, so `code` also filters values for
keys such as `zipcode`, `country_code`, and `error_code`. That's the
same tradeoff the existing `key` and `sid` terms already make.

Stacked on #20904, which takes 0.19.0. Merge that
one first, then retarget this PR to `master`.

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

## PRE-MERGE CHECKLIST

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

<!-- junior-request-attribution:start -->
via @chargome.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC02TB1YBNGJ%3A1795032929.907009 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AC02TB1YBNGJ%3A1795032929.907009)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC02TB1YBNGJ%3A1795032929.907009/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Charly Gomez <20254395+chargome@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview – develop-docs — b74f9a3c Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline sdk-develop-docs PRs touching develop-docs/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants