mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
Enable ptrace prevention on Linux (except snap) (#15204)
This commit is contained in:
@@ -16,7 +16,15 @@ import { BiometricStateService } from "@bitwarden/key-management";
|
||||
import { WindowState } from "../platform/models/domain/window-state";
|
||||
import { applyMainWindowStyles, applyPopupModalStyles } from "../platform/popup-modal-styles";
|
||||
import { DesktopSettingsService } from "../platform/services/desktop-settings.service";
|
||||
import { cleanUserAgent, isDev, isLinux, isMac, isMacAppStore, isWindows } from "../utils";
|
||||
import {
|
||||
cleanUserAgent,
|
||||
isDev,
|
||||
isLinux,
|
||||
isMac,
|
||||
isMacAppStore,
|
||||
isSnapStore,
|
||||
isWindows,
|
||||
} from "../utils";
|
||||
|
||||
const mainWindowSizeKey = "mainWindowSize";
|
||||
const WindowEventHandlingDelay = 100;
|
||||
@@ -156,9 +164,8 @@ export class WindowMain {
|
||||
}
|
||||
}
|
||||
|
||||
// this currently breaks the file portal, so should only be used when
|
||||
// no files are needed but security requirements are super high https://github.com/flatpak/xdg-desktop-portal/issues/785
|
||||
if (process.env.EXPERIMENTAL_PREVENT_DEBUGGER_MEMORY_ACCESS === "true") {
|
||||
// this currently breaks the file portal for snap https://github.com/flatpak/xdg-desktop-portal/issues/785
|
||||
if (!isSnapStore()) {
|
||||
this.logService.info("Disabling memory dumps in main process");
|
||||
try {
|
||||
await processisolations.disableMemoryAccess();
|
||||
|
||||
Reference in New Issue
Block a user