Skip to content

Commit 4bcbdb6

Browse files
committed
Move linux memory isolations behind env variable (#10525)
(cherry picked from commit 5527ffb)
1 parent a3535f1 commit 4bcbdb6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

apps/desktop/src/main/window.main.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,15 @@ export class WindowMain {
120120
}
121121
}
122122

123-
this.logService.info(
124-
"Disabling external memory dumps & debugger access in main process",
125-
);
126-
try {
127-
await processisolations.disableMemoryAccess();
128-
} catch (e) {
129-
this.logService.error("Failed to disable memory access", e);
123+
// this currently breaks the file portal, so should only be used when
124+
// no files are needed but security requirements are super high https://github.com/flatpak/xdg-desktop-portal/issues/785
125+
if (process.env.EXPERIMENTAL_PREVENT_DEBUGGER_MEMORY_ACCESS === "true") {
126+
this.logService.info("Disabling memory dumps in main process");
127+
try {
128+
await processisolations.disableMemoryAccess();
129+
} catch (e) {
130+
this.logService.error("Failed to disable memory dumps", e);
131+
}
130132
}
131133
}
132134

0 commit comments

Comments
 (0)