mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 18:41:52 +08:00
fix: a security issue related to open external (#13864)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { app, clipboard, nativeImage, nativeTheme, shell } from 'electron';
|
||||
import { app, clipboard, nativeImage, nativeTheme } from 'electron';
|
||||
import { getLinkPreview } from 'link-preview-js';
|
||||
|
||||
import { isMacOS } from '../../shared/utils';
|
||||
import { persistentConfig } from '../config-storage/persist';
|
||||
import { logger } from '../logger';
|
||||
import { openExternalSafely } from '../security/open-external';
|
||||
import type { WorkbenchViewMeta } from '../shared-state-schema';
|
||||
import type { NamespaceHandlers } from '../type';
|
||||
import {
|
||||
@@ -151,7 +152,7 @@ export const uiHandlers = {
|
||||
}
|
||||
},
|
||||
openExternal(_, url: string) {
|
||||
return shell.openExternal(url);
|
||||
return openExternalSafely(url);
|
||||
},
|
||||
|
||||
// tab handlers
|
||||
|
||||
Reference in New Issue
Block a user