Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🔒️ Keep email addresses out of PostHog event properties (#3232)
Luke Vella0bd821298745
diff --git a/apps/landing/src/app/[locale]/(main)/cookie-policy/page.tsx b/apps/landing/src/app/[locale]/(main)/cookie-policy/page.tsxindex d8414e4d8..06af8ee27 100644--- a/apps/landing/src/app/[locale]/(main)/cookie-policy/page.tsx+++ b/apps/landing/src/app/[locale]/(main)/cookie-policy/page.tsx@@ -3,12 +3,13 @@import { cacheLife } from "next/cache";import { LegalPageLayout } from "@/components/legal-page-layout";import { Section } from "@/components/section";+import { LinkBase } from "@/i18n/client/link";export default async function CookiePolicy() {cacheLife("max");return (<Section>- <LegalPageLayout title="Cookie policy" lastUpdated="2026-09-03">+ <LegalPageLayout title="Cookie policy" lastUpdated="2026-09-08"><p>This Policy explains how we use cookies and other similar technologieson our website, and your options to control them.@@ -44,11 +45,15 @@ export default async function CookiePolicy() {<p>We use PostHog for product analytics. PostHog does not set cookies anddoes not store anything on your device. Users who are signed in are- recognised through their account. Visitors who are not signed in are- counted using a hash derived from IP address and browser that changes- every day and cannot be used to identify anyone. The data collected- includes pages visited, events triggered, and device type. It is- stored on PostHog's servers in the EU and is not used for+ recognised through their account: their analytics profile is keyed to+ their account and carries the name and email address on it, so it is+ identified data rather than anonymous data. Our{" "}+ <LinkBase href="/privacy-policy">privacy policy</LinkBase> explains+ why we keep it and when it is erased. Visitors who are not signed in+ are counted using a hash derived from IP address and browser that+ changes every day and cannot be used to identify anyone. The data+ collected includes pages visited, events triggered, and device type.+ It is stored on PostHog's servers in the EU and is not used foradvertising or shared with third parties.</p>diff --git a/apps/landing/src/app/[locale]/(main)/privacy-policy/page.tsx b/apps/landing/src/app/[locale]/(main)/privacy-policy/page.tsxindex babd03d3d..44d2782fa 100644--- a/apps/landing/src/app/[locale]/(main)/privacy-policy/page.tsx+++ b/apps/landing/src/app/[locale]/(main)/privacy-policy/page.tsx@@ -9,7 +9,7 @@ export default async function PrivacyPolicy() {cacheLife("max");return (<Section>- <LegalPageLayout title="Privacy policy" lastUpdated="2026-09-01">+ <LegalPageLayout title="Privacy policy" lastUpdated="2026-09-08"><p>At rallly.co, we take your privacy seriously. This privacy policyexplains how we collect, use, and disclose your personal data, and@@ -46,6 +46,15 @@ export default async function PrivacyPolicy() {website.</p>+ <p>+ If you have an account, your analytics profile in Posthog is keyed to+ your account and carries your name and email address. We keep the+ email address there so that, when you contact us about a problem, we+ can find your account's activity and work out what went wrong. It+ is not written into individual analytics events, is not used for+ marketing, and is erased from Posthog when you delete your account.+ </p>+<h2>Optional information about your work</h2><p>@@ -109,6 +118,15 @@ export default async function PrivacyPolicy() {can withdraw consent at any time by asking us to erase the answer.</p>+ <p>+ We keep your name and email address on your analytics profile on the+ basis of our legitimate interest in providing support and diagnosing+ faults: without them we cannot connect a support request to the+ activity that caused it. You can object to this processing at any time+ by contacting us at the address below, and we will remove those+ details from your analytics profile.+ </p>+<h2>Retention of personal data</h2><p>diff --git a/apps/web/src/features/auth/utils.ts b/apps/web/src/features/auth/utils.tsindex 5fbd414eb..3b6ca82e9 100644--- a/apps/web/src/features/auth/utils.ts+++ b/apps/web/src/features/auth/utils.ts@@ -67,11 +67,14 @@ export function isEmailBlocked(email: string) {return false;}+export const emailDomain = (email: string) =>+ email.split("@")[1]?.toLowerCase() ?? "";+/*** Checks if an email domain is a known temporary/disposable email service*/export const isTemporaryEmail = (email: string): boolean => {- const domain = email.split("@")[1]?.toLowerCase();+ const domain = emailDomain(email);if (!domain) return false;return temporaryEmailDomains.includes(domain);diff --git a/apps/web/src/lib/auth.ts b/apps/web/src/lib/auth.tsindex 7804b075b..3a989fab3 100644--- a/apps/web/src/lib/auth.ts+++ b/apps/web/src/lib/auth.ts@@ -25,7 +25,11 @@ import { cache } from "react";import { getInstanceBranding } from "@/emails/branding";import { env } from "@/env";import { linkAnonymousUser } from "@/features/auth/mutations";-import { isEmailBlocked, isTemporaryEmail } from "@/features/auth/utils";+import {+ emailDomain,+ isEmailBlocked,+ isTemporaryEmail,+} from "@/features/auth/utils";import { getStripe } from "@/features/billing/service";import type { UserDTO } from "@/features/user/schema";import { jobTitleFieldSchema } from "@/features/user/schema";@@ -458,14 +462,17 @@ export const authLib = betterAuth({}if (path === "/email-otp/request-email-change") {- // Email changes are only available to registered users.+ // Email changes are only available to registered users. Event+ // properties are immutable and outlive the person, so only the+ // domain relationship is recorded here; the address itself lives+ // on the person profile, which erasure removes.track({ id: session.user.id, isGuest: false },{event: "account_email_change_request",properties: {- fromEmail: session.user.email,- toEmail: newEmail,+ domain_changed:+ emailDomain(session.user.email) !== emailDomain(newEmail),},},);