From 2aa25cb3aaa6c1e77f3ba96b42aba6a3cc1f9024 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Mon, 19 Jan 2026 14:12:10 +0100 Subject: [PATCH] fix: clarify cookie usage and session storage details in About, FAQ, and Security pages; add session replay explanation in FAQ --- app/about/page.tsx | 2 +- app/faq/page.tsx | 8 ++++++-- app/security/page.tsx | 2 +- public/script.js | 14 ++++++++++++-- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/about/page.tsx b/app/about/page.tsx index bd48ab5..a11ebf2 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -18,7 +18,7 @@ export default function AboutPage() { We believe in privacy by design. Our analytics platform:

diff --git a/public/script.js b/public/script.js index 618d5d5..f346bbd 100644 --- a/public/script.js +++ b/public/script.js @@ -382,13 +382,22 @@ } } + // * Redact common PII-like URL query/fragment parameters in replay JSON before sending + function redactPiiInReplayJson(jsonStr) { + return jsonStr.replace( + /([?&])(email|token|session|auth|password|secret|api_key|apikey|access_token|refresh_token)=[^&"'\s]*/gi, + '$1$2=***' + ); + } + // * Send chunk of events to server async function sendReplayChunk() { if (!replayId || replayEvents.length === 0) return; const chunk = replayEvents.splice(0, CHUNK_SIZE); const eventsCount = chunk.length; - const data = JSON.stringify(chunk); + let data = JSON.stringify(chunk); + data = redactPiiInReplayJson(data); try { // Try to compress if available @@ -437,7 +446,8 @@ // Send remaining events if (replayEvents.length > 0) { const chunk = replayEvents.splice(0); - const data = JSON.stringify(chunk); + let data = JSON.stringify(chunk); + data = redactPiiInReplayJson(data); navigator.sendBeacon( apiUrl + '/api/v1/replays/' + replayId + '/chunks', new Blob([data], { type: 'application/json' })