diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 37f751909121a..32bb193c2fbb6 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -136,6 +136,7 @@ cherry-pick-da11d71a0227.patch m96_fileapi_move_origin_checks_in_bloburlstore_sooner.patch cherry-pick-6bb320d134b1.patch cherry-pick-c5571653d932.patch +cherry-pick-1282354.patch cherry-pick-9db9911e1242.patch cherry-pick-22f27676515e.patch cherry-pick-1283371.patch diff --git a/patches/chromium/cherry-pick-1282354.patch b/patches/chromium/cherry-pick-1282354.patch new file mode 100644 index 0000000000000..8f11706e8c43f --- /dev/null +++ b/patches/chromium/cherry-pick-1282354.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Chris Bookholt +Date: Tue, 11 Jan 2022 00:33:53 +0000 +Subject: ServiceWorkerContainerHost::EnsureFileAccess: abort request + processing if the requesting process lacks file access + +Bug: 1282354 +Change-Id: Ia37ef5b97eedb0d2ad25ffe2869844a40e5be862 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3379268 +Reviewed-by: Hiroki Nakagawa +Commit-Queue: Chris Bookholt +Cr-Commit-Position: refs/heads/main@{#957344} + +diff --git a/content/browser/service_worker/service_worker_container_host.cc b/content/browser/service_worker/service_worker_container_host.cc +index 5aca9f432a9efdb9739363e80b52233339529a1c..8b15f204e457904423da33b01bead1b03b59597a 100644 +--- a/content/browser/service_worker/service_worker_container_host.cc ++++ b/content/browser/service_worker/service_worker_container_host.cc +@@ -375,10 +375,12 @@ void ServiceWorkerContainerHost::EnsureFileAccess( + ChildProcessSecurityPolicyImpl* policy = + ChildProcessSecurityPolicyImpl::GetInstance(); + for (const auto& file : file_paths) { +- if (!policy->CanReadFile(process_id_, file)) ++ if (!policy->CanReadFile(process_id_, file)) { + mojo::ReportBadMessage( + "The renderer doesn't have access to the file " + "but it tried to grant access to the controller."); ++ return; ++ } + + if (!policy->CanReadFile(controller_process_id, file)) + policy->GrantReadFile(controller_process_id, file);