Browse Source

fix: implement missing applicationSupportsSecureRestorableState (#40296)

Milan Burda 1 year ago
parent
commit
4b1c31e4db
1 changed files with 8 additions and 0 deletions
  1. 8 0
      shell/browser/mac/electron_application_delegate.mm

+ 8 - 0
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