From a2af3f460aca4f1c7d536328c8726b5c2d6e6367 Mon Sep 17 00:00:00 2001 From: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com> Date: Thu, 17 Jul 2025 07:51:11 -0700 Subject: [PATCH] Desktop: Resolves #11866: Rich Text Editor: Add less information to the log file when pasting (#12684) --- .../NoteBody/TinyMCE/utils/shouldPasteResources.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.ts b/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.ts index 9549d712bb..d77b39c903 100644 --- a/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.ts +++ b/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.ts @@ -18,11 +18,12 @@ const logger = Logger.create('shouldPasteResources'); // instead the clipboard resources, which will contain the actual image. // // We have a lot of log statements so that if someone reports a bug we can ask -// them to check the console and give us the messages they have. +// them to check the console and give us the messages they have. However, to avoid +// including sensitive information in the logs, users will need to check the console, +// not the log file. export default (pastedText: string, pastedHtml: string, resourceMds: string[]) => { - logger.info('Pasted text:', pastedText); - logger.info('Pasted HTML:', pastedHtml); - logger.info('Resources:', resourceMds); + const debugInformation = JSON.stringify({ pastedText, pastedHtml, resourceMds }, undefined, '\t'); + logger.debug('Input data:', debugInformation); if (pastedText) { logger.info('Not pasting resources only because the clipboard contains plain text');