From 203568c967569b1bd1c4ace413c77c863f17a767 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Wed, 24 Jun 2026 08:22:01 -0400 Subject: [PATCH] fix(logging): redact PII from media-error console warnings msgContent media load/thumbnail failures now log only the error name+message, not the full error/event object that may carry content data. Co-Authored-By: Claude Opus 4.8 --- src/app/features/room/msgContent.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/features/room/msgContent.ts b/src/app/features/room/msgContent.ts index b2786b29e..d89dfb70f 100644 --- a/src/app/features/room/msgContent.ts +++ b/src/app/features/room/msgContent.ts @@ -50,7 +50,7 @@ export const getImageMsgContent = async ( ): Promise => { const { file, originalFile, encInfo, metadata } = item; const [imgError, imgEl] = await to(loadImageElement(getImageFileUrl(originalFile))); - if (imgError) console.warn('Failed to load image element:', imgError.message); + if (imgError) console.warn('Failed to load image element:', imgError.name, imgError.message); const content: IContent = { msgtype: MsgType.Image, @@ -85,7 +85,8 @@ export const getVideoMsgContent = async ( const { file, originalFile, encInfo, metadata } = item; const [videoError, videoEl] = await to(loadVideoElement(getVideoFileUrl(originalFile))); - if (videoError) console.warn('Failed to load video element:', videoError.message); + if (videoError) + console.warn('Failed to load video element:', videoError.name, videoError.message); const content: IContent = { msgtype: MsgType.Video, @@ -109,7 +110,8 @@ export const getVideoMsgContent = async ( scaleYDimension(videoEl.videoWidth, 512, videoEl.videoHeight), ); } - if (thumbError) console.warn('Failed to generate video thumbnail:', thumbError.message); + if (thumbError) + console.warn('Failed to generate video thumbnail:', thumbError.name, thumbError.message); content.info = { ...getVideoInfo(videoEl, file), ...thumbContent,