Apply additional security recommendations (#2050)

* enable sandbox

* enable CSP (umami tentatively works?) and reduce amount of ipc APIs exposed

* remove csp from index
This commit is contained in:
Kendall Garner
2026-05-23 05:09:22 +00:00
committed by GitHub
parent 0de1e1aa3e
commit 7befd70e21
19 changed files with 179 additions and 190 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import { ipcRenderer, IpcRendererEvent, OpenDialogOptions, webFrame } from 'electron';
import { ipcRenderer, OpenDialogOptions, webFrame } from 'electron';
import { TitleTheme } from '/@/shared/types/types';
@@ -41,8 +41,8 @@ const setZoomFactor = (zoomFactor: number) => {
webFrame.setZoomFactor(zoomFactor / 100);
};
const fontError = (cb: (event: IpcRendererEvent, file: string) => void) => {
ipcRenderer.on('custom-font-error', cb);
const fontError = (cb: (file: string) => void) => {
ipcRenderer.on('custom-font-error', (_, file) => cb(file));
};
const themeSet = (theme: TitleTheme): void => {