Skip to content

fix: deny SDK $session_entry_*/$initial_* campaign properties - #61

Merged
Aliferous3 merged 1 commit into
mainfrom
fix/session-entry-campaign-denylist
Sep 29, 2026
Merged

Aliferous3 merged 1 commit into
mainfrom
fix/session-entry-campaign-denylist

Conversation

@Aliferous3

Copy link
Copy Markdown
Owner

Summary

Found during production QA of the Web Analytics tranche: a hostile URL like ?utm_source=SECRET leaked its value as $session_entry_utm_source inside $pageview payloads. posthog-js generates $session_entry_<param> / $initial_<param> dynamically for every campaign param it sees — the denylist only covered the bare names.

  • Denylist now enumerates every $session_entry_/$initial_ campaign variant.
  • scrubEventProperties additionally denies the $session_entry_/$initial_ prefixes outright, covering custom_campaign_params and any future SDK variant.
  • Regression test asserts the hostile values never survive scrubbing.

Identical fix already landed in dev-ledger-site (c111efe).

Test plan

  • 455 tests green, typecheck + build green
  • Post-merge: hostile-URL re-test shows no SECRET/DO_NOT_SEND/private in payload

Generated with Devin

posthog-js stamps $session_entry_<param> and $initial_<param> for every
campaign param it sees in the query string — a hostile URL like
/?utm_source=SECRET therefore leaked utm values inside otherwise
sanitized events. Enumerate every derived variant in the denylist and
add a prefix-level guard so custom_campaign_params and future variants
are covered too.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
dev-ledger Ready Ready Preview Sep 29, 2026 9:05pm UTC

@Aliferous3
Aliferous3 merged commit 4e32d45 into main Sep 29, 2026
5 checks passed
@Aliferous3
Aliferous3 deleted the fix/session-entry-campaign-denylist branch September 29, 2026 21:05

This branch was successfully deployed

1 active deployment
Preview — d82033c2 Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant