fix(security): gate privileged file IPC with capabilities

This commit is contained in:
Sucukdeluxe
2026-08-11 22:51:47 +02:00
parent de05539422
commit a79af3f3fe
10 changed files with 662 additions and 144 deletions
+4 -4
View File
@@ -491,12 +491,12 @@ function initCutterDragDrop(): void {
showAppToast(UI_TEXT.cutter.unsupportedFile, 'warn');
return;
}
const filePath = window.api.getPathForFile(file);
if (!filePath) return;
const selection = await window.api.selectDroppedVideo(file);
if (!selection) return;
const loader = (window as unknown as { requestCutterVideoReplacement?: (p: string) => Promise<void> }).requestCutterVideoReplacement;
const loader = (window as unknown as { requestCutterVideoReplacement?: (selection: FileCapabilityReference) => Promise<void> }).requestCutterVideoReplacement;
if (typeof loader === 'function') {
await loader(filePath);
await loader(selection);
}
});
}