upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / keybase / trunk / 0001-Maintain-current-contextIsolation-behavior-across-el.patch
blobeadbe58af122879462e8fadcd6c5ea6cf0c2bbef
1 From c9f8ba2091da223fa703923e36afa4ba5f1731aa Mon Sep 17 00:00:00 2001
2 From: Eli Schwartz <eschwartz@archlinux.org>
3 Date: Wed, 23 Jun 2021 19:06:12 -0400
4 Subject: [PATCH] Maintain current contextIsolation behavior across electron 11
5 vs. >=12
7 For what this does, see:
9 https://www.electronjs.org/docs/breaking-changes#default-changed-contextisolation-defaults-to-true
10 https://github.com/electron/electron/blob/main/docs/tutorial/context-isolation.md
12 In electron 11, this logged:
14 > The default of contextIsolation is deprecated and will be changing from
15 > false to true in a future release of Electron.
17 In electron 12, Keybase refused to start. Explicitly specifying the old
18 behavior makes Keybase run again.
20 "for the security of your application" Keybase may wish in future to
21 restructure and support context isolation, but that would be in the
22 future.
23 ---
24 shared/desktop/app/main-window.desktop.tsx | 1 +
25 shared/desktop/app/menu-bar.desktop.tsx | 1 +
26 shared/desktop/app/node.desktop.tsx | 1 +
27 3 files changed, 3 insertions(+)
29 diff --git a/shared/desktop/app/main-window.desktop.tsx b/shared/desktop/app/main-window.desktop.tsx
30 index a93ffa11a7..9ef4f6f288 100644
31 --- a/shared/desktop/app/main-window.desktop.tsx
32 +++ b/shared/desktop/app/main-window.desktop.tsx
33 @@ -275,6 +275,7 @@ export default () => {
34 minWidth: 740,
35 show: false,
36 webPreferences: {
37 + contextIsolation: false,
38 backgroundThrottling: false,
39 devTools: showDevTools,
40 enableRemoteModule: true,
41 diff --git a/shared/desktop/app/menu-bar.desktop.tsx b/shared/desktop/app/menu-bar.desktop.tsx
42 index 1597c020bd..e1aa62a854 100644
43 --- a/shared/desktop/app/menu-bar.desktop.tsx
44 +++ b/shared/desktop/app/menu-bar.desktop.tsx
45 @@ -40,6 +40,7 @@ export default (menubarWindowIDCallback: (id: number) => void) => {
46 resizable: false,
47 transparent: true,
48 webPreferences: {
49 + contextIsolation: false,
50 enableRemoteModule: true,
51 nodeIntegration: true,
52 nodeIntegrationInWorker: false,
53 diff --git a/shared/desktop/app/node.desktop.tsx b/shared/desktop/app/node.desktop.tsx
54 index 6368bc18b9..7c8c4a34d5 100644
55 --- a/shared/desktop/app/node.desktop.tsx
56 +++ b/shared/desktop/app/node.desktop.tsx
57 @@ -365,6 +365,7 @@ const plumbEvents = () => {
58 show: false, // Start hidden and show when we actually get props
59 titleBarStyle: 'customButtonsOnHover' as const,
60 webPreferences: {
61 + contextIsolation: false,
62 enableRemoteModule: true,
63 nodeIntegration: true,
64 nodeIntegrationInWorker: false,
65 --
66 2.32.0