From 5632bca45c09b08ce64f7afcca149acfc15e8757 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Date: Thu, 23 Sep 2021 15:53:42 +0300
Subject: [PATCH] Hide some navigation timing info when cross-origin redirects
are present
When a navigation includes cross-origin redirects, the navigation timing
entry should not include information about redirect timing and internal
network timing, as that may expose cross-origin timing information.
This is already implemented and tested, but has been omitted when
refactoring the navigation timing spec into HTML.
Closes #7104
---
source | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/source b/source
index 5f5ddab208c..ce93377b57b 100644
--- a/source
+++ b/source
@@ -2482,6 +2482,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
the RequestDestination
enumeration
the fetch()
method
serialize a response URL for reporting
+ create an opaque timing info
response and its
@@ -3964,6 +3965,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
handle fetch
match service worker registration
service worker
+ service worker timing info
service worker client
ServiceWorker
interface
ServiceWorkerContainer
interface
@@ -87520,16 +87522,30 @@ interface Location { // but see also has cross-origin redirects is true;
- otherwise navigationParams's request's
- redirect count.
+ data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects is
+ true; otherwise navigationParams's
+ request's
+ redirect count.
+
+ Let timingInfo be the result of
+ creating an opaque timing info given
+ navigationParams's response's
+ timing info if navigationParams's
+ has cross-origin redirects
+ is true; otherwise response's
+ timing info.
+
+ Let serviceWorkerTimingInfo be
+ a new service worker timing info
+ if navigationParams's has cross-origin redirects is
+ true; otherwise response's
+ service worker timing info.
+
Create the navigation timing entry for document, with
- navigationParams's response's timing info,
- response's service worker timing info,
- redirectCount, and navigationType.
+ timingInfo, serviceWorkerTimingInfo, redirectCount, and
+ navigationType.
If navigationParams's response