From 4b1c31e4dbd00cd58e159cbc2ab41de3b1ce3a86 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 31 Oct 2023 10:22:58 -0400 Subject: [PATCH] fix: implement missing applicationSupportsSecureRestorableState (#40296) --- shell/browser/mac/electron_application_delegate.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index 4bf428e890ae..968ab0d29ff4 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -198,4 +198,12 @@ static NSDictionary* UNNotificationResponseToNSDictionary( } } +// This only has an effect on macOS 12+, and requests any state restoration +// archive to be created with secure encoding. See the article at +// https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/ +// for more details. +- (BOOL)applicationSupportsSecureRestorableState:(NSApplication*)app { + return YES; +} + @end