mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +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 { WindowState } from "../platform/models/domain/window-state";
|
||||||
import { applyMainWindowStyles, applyPopupModalStyles } from "../platform/popup-modal-styles";
|
import { applyMainWindowStyles, applyPopupModalStyles } from "../platform/popup-modal-styles";
|
||||||
import { DesktopSettingsService } from "../platform/services/desktop-settings.service";
|
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 mainWindowSizeKey = "mainWindowSize";
|
||||||
const WindowEventHandlingDelay = 100;
|
const WindowEventHandlingDelay = 100;
|
||||||
@@ -156,9 +164,8 @@ export class WindowMain {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this currently breaks the file portal, so should only be used when
|
// this currently breaks the file portal for snap https://github.com/flatpak/xdg-desktop-portal/issues/785
|
||||||
// no files are needed but security requirements are super high https://github.com/flatpak/xdg-desktop-portal/issues/785
|
if (!isSnapStore()) {
|
||||||
if (process.env.EXPERIMENTAL_PREVENT_DEBUGGER_MEMORY_ACCESS === "true") {
|
|
||||||
this.logService.info("Disabling memory dumps in main process");
|
this.logService.info("Disabling memory dumps in main process");
|
||||||
try {
|
try {
|
||||||
await processisolations.disableMemoryAccess();
|
await processisolations.disableMemoryAccess();
|
||||||
|
|||||||
Reference in New Issue
Block a user