From e57a87ecfccea902c49c0a6cb8e221fae82b5a3f Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 27 Oct 2025 09:41:12 -0400 Subject: [PATCH] Sanitize watch history telemetry metadata --- js/services/watchHistoryTelemetry.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/services/watchHistoryTelemetry.js b/js/services/watchHistoryTelemetry.js index 14d565f1..6c3fc5dd 100644 --- a/js/services/watchHistoryTelemetry.js +++ b/js/services/watchHistoryTelemetry.js @@ -16,6 +16,9 @@ function sanitizeVideoMetadata(video) { return null; } + // Transport identifiers (URL, magnet, hashes) are intentionally omitted so + // watch history storage never persists playback endpoints. Only surface the + // minimal fields needed to render the saved entry. const createdAtCandidates = [ video.rootCreatedAt, video.created_at, @@ -37,11 +40,6 @@ function sanitizeVideoMetadata(video) { thumbnail: typeof video.thumbnail === "string" ? video.thumbnail : "", pubkey: typeof video.pubkey === "string" ? video.pubkey : "", created_at: createdAt, - url: typeof video.url === "string" ? video.url : "", - magnet: typeof video.magnet === "string" ? video.magnet : "", - infoHash: typeof video.infoHash === "string" ? video.infoHash : "", - legacyInfoHash: - typeof video.legacyInfoHash === "string" ? video.legacyInfoHash : "", }; } @@ -192,6 +190,8 @@ export default class WatchHistoryTelemetry { } const metadata = { + // Persist only sanitized metadata so local history never stores playback + // transports or magnet fingerprints. video: sanitizeVideoMetadata(video), };