diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 09:03:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 09:03:13 +0000 |
commit | 0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365 (patch) | |
tree | 1437375a1c16af40bb2982577c25eb9608e17566 /netwerk/ipc | |
parent | Adding debian version 115.11.0esr-1~deb12u1. (diff) | |
download | firefox-esr-0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365.tar.xz firefox-esr-0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365.zip |
Merging upstream version 115.12.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/ipc')
-rw-r--r-- | netwerk/ipc/DocumentLoadListener.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp index 54c9a53e65..a6a7b21749 100644 --- a/netwerk/ipc/DocumentLoadListener.cpp +++ b/netwerk/ipc/DocumentLoadListener.cpp @@ -777,6 +777,24 @@ auto DocumentLoadListener::Open(nsDocShellLoadState* aLoadState, if (cos && aUrgentStart) { cos->AddClassFlags(nsIClassOfService::UrgentStart); } + + // ClientChannelHelper below needs us to have finalized the principal for + // the channel because it will request that StoragePrincipalHelper mint us a + // principal that needs to match the same principal that a later call to + // StoragePrincipalHelper will mint when determining the right origin to + // look up the ServiceWorker. + // + // Because nsHttpChannel::AsyncOpen calls UpdateAntiTrackingInfoForChannel + // which potentially flips the third party bit/flag on the partition key on + // the cookie jar which impacts the principal that will be minted, it is + // essential that UpdateAntiTrackingInfoForChannel is called before + // AddClientChannelHelperInParent below. + // + // Because the call to UpdateAntiTrackingInfoForChannel is largely + // idempotent, we currently just make the call ourselves right now. The one + // caveat is that the RFPRandomKey may be spuriously regenerated for + // top-level documents. + AntiTrackingUtils::UpdateAntiTrackingInfoForChannel(httpChannel); } // Setup a ClientChannelHelper to watch for redirects, and copy |