From a62e5bcfcfad344796c05b7efcf94cd5438f3693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Tue, 21 Apr 2026 19:55:28 +0000 Subject: [PATCH] feat: Remove paths from plugin packages --- src/node/handler/PadMessageHandler.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/node/handler/PadMessageHandler.ts b/src/node/handler/PadMessageHandler.ts index 8285a3a8a52..d0f34600ca0 100644 --- a/src/node/handler/PadMessageHandler.ts +++ b/src/node/handler/PadMessageHandler.ts @@ -1068,6 +1068,11 @@ const handleClientReady = async (socket:any, message: ClientReadyMessage) => { throw new Error('corrupt pad'); } + let pluginsSanitized: any = plugins.plugins + Object.keys(plugins.plugins).forEach(function(element) { + const p: any = plugins.plugins[element].package + pluginsSanitized[element].package = {name: p.name, version: p.version}; + }); // Warning: never ever send sessionInfo.padId to the client. If the client is read only you // would open a security hole 1 swedish mile wide... const canEditPadSettings = settings.enablePadWideSettings && @@ -1116,7 +1121,7 @@ const handleClientReady = async (socket:any, message: ClientReadyMessage) => { exportAvailable: exportAvailable(), docxExport: settings.docxExport, plugins: { - plugins: plugins.plugins, + plugins: pluginsSanitized, parts: plugins.parts, }, indentationOnNewLine: settings.indentationOnNewLine,