fix: restrict sendToFrame to same-process frames by default (#26875)

This commit is contained in:
Jeremy Rose 2020-12-09 12:48:16 -08:00 committed by GitHub
parent 76f721474e
commit 07a1c2a3e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 89 additions and 36 deletions

View file

@ -68,8 +68,8 @@ declare namespace Electron {
_callWindowOpenHandler(event: any, url: string, frameName: string, rawFeatures: string): Electron.BrowserWindowConstructorOptions | null;
_setNextChildWebPreferences(prefs: Partial<Electron.BrowserWindowConstructorOptions['webPreferences']> & Pick<Electron.BrowserWindowConstructorOptions, 'backgroundColor'>): void;
_send(internal: boolean, channel: string, args: any): boolean;
_sendToFrame(internal: boolean, frameId: number, channel: string, args: any): boolean;
_sendToFrameInternal(frameId: number, channel: string, ...args: any[]): boolean;
_sendToFrame(internal: boolean, frameId: number | [number, number], channel: string, args: any): boolean;
_sendToFrameInternal(frameId: number | [number, number], channel: string, ...args: any[]): boolean;
_postMessage(channel: string, message: any, transfer?: any[]): void;
_sendInternal(channel: string, ...args: any[]): void;
_printToPDF(options: any): Promise<Buffer>;