diff --git a/electron/app/utils/libreoffice-check.ts b/electron/app/utils/libreoffice-check.ts index aae8c459..aaf76300 100644 --- a/electron/app/utils/libreoffice-check.ts +++ b/electron/app/utils/libreoffice-check.ts @@ -382,6 +382,9 @@ async function showLibreOfficeInstallerWindow(): Promise { icon: path.join(baseDir, "resources/ui/assets/images/presenton_short_filled.png"), webPreferences: { webSecurity: false, + contextIsolation: true, + nodeIntegration: false, + sandbox: false, preload: path.join(__dirname, "../preloads/libreoffice-installer.js"), }, }); diff --git a/electron/app/utils/setup-dependencies.ts b/electron/app/utils/setup-dependencies.ts index f014c095..8b4888cf 100644 --- a/electron/app/utils/setup-dependencies.ts +++ b/electron/app/utils/setup-dependencies.ts @@ -86,6 +86,10 @@ function showSetupInstallerWindow(): Promise { ), webPreferences: { webSecurity: false, + contextIsolation: true, + nodeIntegration: false, + // Keep preload runtime consistent with the main window in packaged builds. + sandbox: false, preload: path.join(__dirname, "../preloads/setup-installer.js"), }, }); diff --git a/electron/resources/ui/setup-installer/index.html b/electron/resources/ui/setup-installer/index.html index aa398fe1..e8519948 100644 --- a/electron/resources/ui/setup-installer/index.html +++ b/electron/resources/ui/setup-installer/index.html @@ -211,6 +211,7 @@