Skip to content

refactor: drop optional POSTHOG_IP_HASH_SALT#505

Merged
Ehesp merged 1 commit into
mainfrom
posthog-drop-ip-salt
Jul 2, 2026
Merged

refactor: drop optional POSTHOG_IP_HASH_SALT#505
Ehesp merged 1 commit into
mainfrom
posthog-drop-ip-salt

Conversation

@claude

@claude claude Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Requested by Elliot Hesp · Slack thread

Before / After: IP anonymization previously used an HMAC when POSTHOG_IP_HASH_SALT was set, falling back to a plain SHA-256. It now always uses a plain SHA-256, and the POSTHOG_IP_HASH_SALT env var is gone. That's one less deploy variable — the only PostHog env var is now POSTHOG_KEY.

How: Simplified anonymizeIp in app/src/lib/posthog.ts — removed the createHmac import and the salt/HMAC branch.

Note: A plain, unsalted SHA-256 of an IP is pseudonymous but technically reversible (the IPv4 space is small enough to brute-force). The privacy policy's "irreversibly hashed" wording (introduced in PR #500, docs/legal/privacy.mdx) should be softened to "hashed" to stay accurate.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ud99xX7wsfWTpsu8TQxAiZ


Generated by Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ud99xX7wsfWTpsu8TQxAiZ
@railway-app railway-app Bot temporarily deployed to docs.page / docs.page-pr-505 July 2, 2026 12:43 Destroyed
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@railway-app

railway-app Bot commented Jul 2, 2026

Copy link
Copy Markdown

🚅 Deployed to the docs.page-pr-505 environment in docs.page

Service Status Web Updated (UTC)
docs.page ✅ Success (View Logs) Web Jul 2, 2026 at 12:44 pm

@Ehesp Ehesp marked this pull request as ready for review July 2, 2026 19:01
@Ehesp Ehesp merged commit 6ece81e into main Jul 2, 2026
3 checks passed
@Ehesp Ehesp deleted the posthog-drop-ip-salt branch July 2, 2026 19:01
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.

3 participants