From e33ea5e3e136514ac2df5ca7ea5b8bff5cefc89e Mon Sep 17 00:00:00 2001
From: clamy
The Document
has a cross-origin opener
- policy, which is a cross-origin opener policy, initially "unsafe-none
".
DocumentOrShadowRoot
interfacereplace
".
+ A browsing context has a virtual + browsing context group id integer. It is initially 0.
+ +A browsing context has an initial + url, which is a URL or null. It is initially null.
+ +A browsing context has an opener origin at + creation, which is an origin or null. It is initially null.
If creator is non-null, then set browsingContext's creator origin to return creator's origin, browsingContext's creator URL to return - creator's URL, and + creator's URL, browsingContext's creator base URL to return creator's base URL.
Let sandboxFlags be the result of determining the creation sandboxing flags given browsingContext and embedder.
Let coop be "unsafe-none
".
Let coop be a new cross-origin opener policy.
If creator is non-null and creator's origin is same origin with creator's relevant settings object's @@ -77522,6 +77532,15 @@ popup4.close();
Set browsingContext's opener browsing context to opener.
Set browsingContext's virtual + browsing context group id to opener's top-level browsing context's + virtual browsing context group + id.
Set browsingContext's opener origin at + creation to opener's active document's + origin.
Legacy-clone a browsing session storage shed with
opener's browsing session and
browsingContext's browsing session.
If current's top-level browsing context's active
- document's cross-origin opener policy is
- "same-origin
" or "same-origin-plus-COEP
", then:same-origin
" or "same-origin-plus-COEP
", then:
Let currentDocument be current's active @@ -79899,6 +79919,11 @@ interface BarProp { [[Window]] internal slot of this.
Check if an access between two browsing contexts + should be reported, given the current global object's browsing + context, W's browsing context, P, the current + global object, and the current settings object.
If ! IsPlatformObjectSameOrigin(W) is true, then return ? OrdinaryGet(this, P, Receiver).
Check if an access between two browsing contexts + should be reported, given the current global object's browsing + context, W's browsing context, P, the current + global object and the current settings object.
If ! IsPlatformObjectSameOrigin(W) is true, then return ? OrdinarySet(this, P, V, Receiver).
A cross-origin opener policy allows a document which is navigated to in a +
A cross-origin opener policy value allows a document which is navigated to in a top-level browsing context to force the creation of a new top-level browsing - context, and a corresponding group. It has one of the - following values:
+ context, and a corresponding group. The possible values + are:unsafe-none
"To match cross-origin opener policies, given a - cross-origin opener policy A, an origin originA, a - cross-origin opener policy B, and an origin - originB:
+A cross-origin opener policy consists of:
+ +A value, which is a cross-origin opener policy value, initially "unsafe-none
".
A reporting endpoint, which is string or + null, initially null.
A report-only value, which is a cross-origin opener policy value, initially
+ "unsafe-none
".
A report-only reporting endpoint, + which is a string or null, initially null.
To match cross-origin opener policy values, given a + cross-origin opener policy value A, an origin + originA, a cross-origin opener policy value B, and an + origin originB:
If A is "unsafe-none
" and B
@@ -80941,19 +80989,21 @@ interface BarProp {
Return false.
Cross-Origin-Opener-Policy
`
- headerA Document
's cross-origin opener
policy is derived from the `Cross-Origin-Opener-Policy
` HTTP response header.
- This header is a structured header whose value must
- be a token.
The valid token values are "unsafe-none
", "same-origin-allow-popups
", and "same-origin
".
Cross-Origin-Opener-Policy-Report-Only
`
+ HTTP response headers. These headers are structured
+ headers whose value must be a token.
+
+
+ The valid token values are the opener policy values. The token may also have
+ attached parameters; of these, the "report-to
" parameter can have a valid URL
+ string identifying an appropriate reporting endpoint.
Per the processing model described below, user agents will ignore this header if it contains an invalid value. Likewise, user agents will ignore this header if the value cannot be @@ -80966,66 +81016,208 @@ interface BarProp { reservedEnvironment:
Let policy be a new cross-origin opener policy.
If reservedEnvironment is a non-secure context, then return
- "unsafe-none
".
Let value be the result of getting a structured field value given
`Cross-Origin-Opener-Policy
` and "item
" from response's header list.
If value is null, then return "unsafe-none
".
If parsedItem is neither failure nor null, then:
-If value[0] is not "same-origin
" or
- "same-origin-allow-popups
", then return
- "unsafe-none
".
If parsedItem[0] is "same-origin
", then:
Let coep be the result of obtaining a cross-origin embedder policy from response.
If coep's value is "require-corp
", then set policy's value to "same-origin-plus-COEP
".
Else, set policy's value to "same-origin
".
If parsedItem[0] is "same-origin-allow-popups
", then set
+ policy's value to "same-origin-allow-popups
".
If parsedItem[1]["report-to
"] exists and it is a string, then set reporting endpoint to
+ parsedItem[1]["report-to
"].
Set parsedItem to the result of getting a structured field value
+ given `Cross-Origin-Opener-Policy-Report-Only
` and
+ "item
" from response's header list.
If value[0] is "same-origin
", then:
If parsedItem is neither failure nor null, then:
Let coep be the result of obtaining - an embedder policy from response.
If parsedItem[0] is "same-origin
", then:
If coep's value is
- "require-corp
", then return "same-origin-plus-COEP
".
Let coep be the result of obtaining a cross-origin embedder policy from response.
If coep's value is "require-corp
" or coep's report-only value is "require-corp
", then set policy's report-only value to "same-origin-plus-COEP
".
Report only COOP also considers report-only COEP to assign the special
+ "same-origin-plus-COEP
" value. This allows
+ developers more freedom in the order of deployment of COOP and COEP.
Else, set policy's report-only
+ value to "same-origin
".
If parsedItem[0] is "same-origin-allow-popups
", then set
+ policy's report-only value to
+ "same-origin-allow-popups
".
If parsedItem[1]["report-to
"] exists and it is a string, then set report-only reporting endpoint to
+ parsedItem[1]["report-to
"].
Return value[0].
Return policy.
To check if COOP values require + a browsing context group switch, given a boolean isInitialAboutBlank, two origins responseOrigin, + activeDocumentNavigationOrigin, and two cross-origin + opener policy values responseCOOPValue and activeDocumentCOOPValue:
+ +If the result of matching + activeDocumentCOOPValue, activeDocumentNavigationOrigin, + responseCOOPValue and responseOrigin is true, return + false.
If all of the following are true:
+ +isInitialAboutBlank,
activeDocumentCOOPValue's value is
+ "same-origin-allow-popups
", and
responseCOOPValue is "unsafe-none
",
then return false.
+Return true.
+To check if enforcing report-only COOP + would require a browsing context group switch, given a boolean + isInitialAboutBlank, two origins + responseOrigin, activeDocumentNavigationOrigin, and two cross-origin opener policies responseCOOP, + and activeDocumentCOOP:
+ +If the result of checking if + COOP values require a browsing context group switch given isInitialAboutBlank, + sandboxFlags, responseOrigin, activeDocumentNavigationOrigin, + responseCOOP's report-only value + and activeDocumentCOOPReportOnly's report-only value is false, then return false.
+ +Matching report-only policies allows a website to specify the same report-only + cross-origin opener policy on all its pages and not receive violation reports for navigations + between these pages.
+If the result of checking if + COOP values require a browsing context group switch given isInitialAboutBlank, + sandboxFlags, responseOrigin, activeDocumentNavigationOrigin, + responseCOOP's value and + activeDocumentCOOPReportOnly's report-only value is true, then return true.
If the result of checking if + COOP values require a browsing context group switch given isInitialAboutBlank, + sandboxFlags, responseOrigin, activeDocumentNavigationOrigin, + responseCOOP's report-only value + and activeDocumentCOOPReportOnly's value is + true, then return true.
Return false.
A cross-origin opener policy enforcement result is a struct with the following items:
A boolean needs a browsing context group - switch.
A boolean would need a browsing context group switch due + to report-only, initially false.
An origin origin.
A URL url.
An origin current origin.
A cross-origin opener policy cross-origin opener policy.
A boolean current context is + navigation source.
To enforce a response's cross-origin opener policy, given a - browsing context browsingContext, an origin - responseOrigin, a cross-origin opener policy responseCOOP, and - a cross-origin opener policy enforcement result - currentCOOPEnforcementResult:
+ browsing context browsingContext, a URL + responseURL, an origin responseOrigin, a cross-origin + opener policy responseCOOP, a cross-origin + opener policy enforcement result currentCOOPEnforcementResult and a referrer referrer:Let newCOOPEnforcementResult be a new cross-origin opener policy enforcement result whose needs a browsing context group switch is + data-x="coop-enforcement-result">cross-origin opener policy enforcement result given currentCOOPEnforcementResult's needs a - browsing context group switch, origin is - responseOrigin, and cross-origin opener - policy is responseCOOP.
Let isInitialAboutBlank be false.
If the result of matching - currentCOOPEnforcementResult's cross-origin opener policy, - currentCOOPEnforcementResult's origin, - responseCOOP, and responseOrigin is true, then return - newCOOPEnforcementResult.
If isInitialAboutBlank is true and browsingContext's initial url is null, set + browsingContext's initial url to + responseURL.
If all of the following are true:
- -isInitialAboutBlank
If the result of checking if + COOP values require a browsing context group switch given isInitialAboutBlank, + currentCOOPEnforcementResult's cross-origin + opener policy's value, + currentCOOPEnforcementResult's origin, + responseCOOP's value, and + responseOrigin is true, then:
-currentCOOPEnforcementResult's cross-origin opener policy is "same-origin-allow-popups
"
Set newCOOPEnforcementResult's needs a browsing context group switch to + true.
responseCOOP is "unsafe-none
"
If browsingContext's browsing context group's browsing + context set's size is greater than 1, then:
-then return newCOOPEnforcementResult.
+If responseCOOP's reporting
+ endpoint is not null and result's needs a browsing context group switch is true, queue a violation report for browsing context group switch
+ when navigating to a COOP response with responseCOOP's reporting endpoint, responseCOOP's
+ value, "enforce
",
+ responseURL, currentCOOPEnforcementResult's url, and referrer.
If currentCOOPEnforcementResult's cross-origin opener policy's reporting endpoint is not null,
+ Queue a violation report for browsing context
+ group switch when navigating when navigating away from a COOP response with
+ activeDocumentCOOP's reporting
+ endpoint, currentCOOPEnforcementResult's cross-origin opener policy's value, "enforce
",
+ currentCOOPEnforcementResult's url,
+ responseURL, and currentCOOPEnforcementResult's current context is navigation source.
Set newCOOPEnforcementResult's needs - a browsing context group switch to true.
If the result of checking if + enforcing report-only COOP would require a browsing context group switch given + isInitialAboutBlank, responseOrigin, + currentCOOPEnforcementResult's origin, + responseCOOP, and currentCOOPEnforcementResult's cross-origin opener policy, is true, then:
+ +Set result's would + need a browsing context group switch due to report-only to true.
If browsingContext's browsing context group's browsing + context set's size is greater than 1, then:
+ +If responseCOOP's reporting
+ endpoint is not null and result's needs a browsing context group switch is true, queue a violation report for browsing context group switch
+ when navigating to a COOP response with responseCOOP's report-only reporting endpoint,
+ responseCOOP's report-only
+ value, "reporting
", responseURL,
+ currentCOOPEnforcementResult's url, and
+ referrer.
If currentCOOPEnforcementResult's cross-origin opener policy's report-only reporting endpoint is not
+ null, Queue a violation report for browsing
+ context group switch when navigating when navigating away from a COOP response with
+ activeDocumentCOOP's report-only
+ reporting endpoint, currentCOOPEnforcementResult's cross-origin opener policy's report-only value, "reporting
", currentCOOPEnforcementResult's url, responseURL, and
+ currentCOOPEnforcementResult's current
+ context is navigation source.
Return newCOOPEnforcementResult.
To obtain a browsing context to use for a - navigation response, given a browsing context - browsingContext, a sandboxing flag set sandboxFlags, and a - cross-origin opener policy navigationCOOP:
+ navigation response, given a browsing contexts + browsingContext, a sandboxing flag set sandboxFlags, a + cross-origin opener policy navigationCOOP and a cross-origin opener policy enforcement result + coopEnforcementResult:Assert: browsingContext is a top-level browsing context.
If coopEnforcementResult's needs a + browsing context group switch is false, then:
+ +If coopEnforcementResult's would need a browsing context group switch due + to report-only is true, set browsing context's virtual browsing context group id to a new + unique identifyer.
return browsingContext.
Let newBrowsingContext be the result of creating a new top-level browsing context.
If navigationCOOP is " If navigationCOOP's value is "same-origin-plus-COEP
", then set
newBrowsingContext's group's cross-origin isolated to true.
If sandboxFlags is not empty, then:
Assert: navigationCOOP is "unsafe-none
".
Assert navigationCOOP's value is
+ "unsafe-none
".
Assert: newBrowsingContext's popup sandboxing flag set is empty.
To check if an access between two browsing contexts + should be reported, given two browsing contexts + accessor and accessed, an array index property name + P, a global object globalObject, and an + environment environement:
+ +If P is not part of CrossOriginProperties, return.
If accessor or any of its ancestors are not same origin with its + top-level browsing context, or if accessed or any of its ancestors are not same origin with its + top-level browsing context, return.
+ +This avoids leaking information about cross-origin iframes to a top level frame + with cross-origin opener policy reporting
+If accessor's top-level browsing context's virtual browsing context group id is + accessed's top-level browsing context's virtual browsing context group id, + return.
Let accessorCOOP be accessor's top-level browsing + context's active document's cross-origin + opener policy.
If accessorCOOP's report-only + reporting endpoint is not null, then:
+ +If accessor's opener browsing context is accessed or + an ancestor of accessed, queue a violation report for access to the + opener, given accessorCOOP's report-only reporting + endpoint,accessorCOOP's report-only value, accessor's + active document's URL, + accessed's active document's URL, accessor's + active document's origin, accessed's active + document's origin, P, accessor's top-level + browsing context's active document's referrer, globalObject, and + environment.
Else, if accessed's opener browsing context is + accessor or an ancestor of + accessor, queue a violation report + for access to an opened window, given accessorCOOP's report-only reporting + endpoint,accessorCOOP's report-only value, accessor's + active document's URL, + accessed's active document's URL, accessed's top-level browsing + context's initial url, + accessor's active document's origin, accessed's + active document's origin, accessed's top-level + browsing context's opener origin at + creation, P, globalObject, and environment.
Else, queue a violation report for access + to another window, given accessorCOOP's report-only reporting + endpoint,accessorCOOP's report-only value, accessor's + active document's URL, + accessed's active document's URL, accessor's + active document's origin, accessed's active + document's origin, P, globalObject, and + environment.
Let accessedCOOP be accessed's top-level browsing + context's active document's cross-origin + opener policy.
If accessedCOOP's report-only + reporting endpoint is not null, then:
+ +If accessed's opener browsing context is accessor or + an ancestor of accessor, queue a violation report for access from the + opener, given accessedCOOP's report-only reporting + endpoint,accessedCOOP's report-only value, accessed's + active document's URL, + accessor's active document's URL, accessed's + active document's origin, accessor's active + document's origin, P, and accessed's top-level + browsing context's active document's referrer.
Else, if accessor's opener browsing context is + accessed or an ancestor of + accessed, queue a violation report + for access from an opened window, given accessedCOOP's report-only reporting + endpoint,accessedCOOP's report-only value, accessed's + active document's URL, + accessor's active document's URL, accessor's top-level browsing + context's initial url, + accessed's active document's origin, accessor's + active document's origin, accessor's top-level + browsing context's opener origin at + creation, and P.
Else, queue a violation report for + access from another window, given accessedCOOP's report-only reporting + endpoint,accessedCOOP's report-only value, accessed's + active document's URL, + accessor's active document's URL, accessed's + active document's origin, accessor's active + document's origin, and P.
To sanitize a URL to send in a report given a + URL url:
+ +Let sanitizedURL be a copy of url.
Set the username given sanitizedURL and + the empty string. + +
Set the password given sanitizedURL and + the empty string. + +
Return the serialization of + sanitizedURL with the exclude fragment flag set.
To queue a violation report for browsing context group + switch when navigating to a COOP response given a string endpoint, a cross-origin opener policy value + coopValue, a string disposition, a URL coopURL, a + URL previousResponseURL, and a referrer + referrer:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +disposition | +
effective-policy | +coopValue | +
previousResponseUrl | +If coopURL and previousResponseURL are same origin this + is the sanitization of + previousResponseURL, null otherwise. | +
referrer | +referrer. | +
violationType | +navigation-to-response | +
Queue body as "coop
"
+ for endpoint with coopURL.
To queue a violation report for browsing context group + switch when navigating away from a COOP response given a string endpoint, a cross-origin opener policy value + coopValue, a string disposition, a URL coopURL, a + URL nextResponseURL, and a boolean + isCOOPResponseNavigationSource:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +disposition | +
effective-policy | +coopValue | +
nextResponseUrl | +If coopURL and nextResponseURL are same origin or + isCOOPResponseNavigationSource is true, this is the sanitization of previousResponseURL, null + otherwise. | +
violationType | +navigation-to-response | +
Queue body as "coop
"
+ for endpoint with coopURL.
To queue a violation report for access to the + opener, given a string endpoint, a cross-origin opener policy value + coopValue, two URLs coopURL and + openerURL, two origins coopOrigin and + openerOrigin, a string propertyName, a referrer referrer, a global + object globalObject, and an environment settings object + environment:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +"reporting " |
+
effectivePolicy | +coopValue | +
property | +propertyName | +
openerUrl | +If coopOrigin and openerOrigin are same origin, this + is the sanitization of openerURL, null + otherwise. | +
referrer | +referrer | +
sourceFile | +Extract it from globalObject | +
lineNumber | +Extract it from globalObject | +
columnNumber | +Extract it from globalObject | +
violationType | +access-to-opener | +
Queue body as "coop
"
+ for endpoint with coopURL and environment.
To queue a violation report for access to an + opened window, given a string endpoint, a cross-origin opener policy value + coopValue, three URLs coopURL, + openedWindowURL and initialWindowURL, three origins coopOrigin, openedWindowOrigin, and + openerInitialOrigin,a string propertyName, a global + object globalObject, and an environment settings object + environment:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +"reporting " |
+
effectivePolicy | +coopValue | +
property | +propertyName | +
openedWindowUrl | +If coopOrigin and openedWindowOrigin are same origin, this + is the sanitization of openedWindowURL, + null otherwise. | +
openedWindowInitialUrl | +If coopOrigin and openerInitialOrigin are same origin, + this is the sanitization of + initialWindowURL, null otherwise. | +
sourceFile | +Extract it from globalObject | +
lineNumber | +Extract it from globalObject | +
columnNumber | +Extract it from globalObject | +
violationType | +access-to-opener | +
Queue body as "coop
"
+ for endpoint with coopURL and environment.
To queue a violation report for access to another + window, given a string endpoint, a cross-origin opener policy value + coopValue, two URLs coopURL and + otherURL, two origins coopOrigin and + otherOrigin, a string propertyName, a global + object globalObject, and an environment settings object + environment:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +"reporting " |
+
effectivePolicy | +coopValue | +
property | +propertyName | +
otherUrl | +If coopOrigin and otherOrigin are same origin, this + is the sanitization of otherURL, null + otherwise. | +
sourceFile | +Extract it from globalObject | +
lineNumber | +Extract it from globalObject | +
columnNumber | +Extract it from globalObject | +
violationType | +access-to-opener | +
Queue body as "coop
"
+ for endpoint with coopURL and environment.
To queue a violation report for access from the + opener, given a string endpoint, a cross-origin opener policy value + coopValue, two URLs coopURL and + openerURL, two origins coopOrigin and + openerOrigin, a string propertyName, and a referrer referrer:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +"reporting " |
+
effectivePolicy | +coopValue | +
property | +propertyName | +
openerUrl | +If coopOrigin and openerOrigin are same origin, this + is the sanitization of openerURL, null + otherwise. | +
referrer | +referrer | +
violationType | +access-to-opener | +
Queue body as "coop
"
+ for endpoint with coopURL.
To queue a violation report for access from an + opened window, given a string endpoint, a cross-origin opener policy value + coopValue, three URLs coopURL, + openedWindowURL and initialWindowURL, three origins coopOrigin, openedWindowOrigin, and + openerInitialOrigin, and a string propertyName:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +"reporting " |
+
effectivePolicy | +coopValue | +
property | +propertyName | +
openedWindowUrl | +If coopOrigin and openedWindowOrigin are same origin, this + is the sanitization of openedWindowURL, + null otherwise. | +
openedWindowInitialUrl | +If coopOrigin and openerInitialOrigin are same origin, + this is the sanitization of + initialWindowURL, null otherwise. | +
violationType | +access-to-opener | +
Queue body as "coop
"
+ for endpoint with coopURL.
To queue a violation report for access from another + window, given a string endpoint, a cross-origin opener policy value + coopValue, two URLs coopURL and + otherURL, two origins coopOrigin and + otherOrigin, and a string propertyName:
+ +Let body be a new object containing the following properties:
+ +key | +value | +
---|---|
disposition | +"reporting " |
+
effectivePolicy | +coopValue | +
property | +propertyName | +
otherUrl | +If coopOrigin and otherOrigin are same origin, this + is the sanitization of otherURL, null + otherwise. | +
violationType | +access-to-opener | +
Queue body as "coop
"
+ for endpoint with coopURL.
Set policy's report only
+ Set policy's report-only
value to " If parsedItem[1]["require-corp
".report-to
"] exists, then set policy's report only reporting endpoint
+ data-x="embedder-policy-report-only-reporting-endpoint">report-only reporting endpointreport-to
"].
If parentPolicy's report only
+ If parentPolicy's report-only
value is " Let ownerPolicy be owner's embedder policy.
- If ownerPolicy's report only
+ If ownerPolicy's report-only
value is " Let coop be a new cross-origin opener policy. Let coopEnforcementResult be a new is a new cross-origin opener policy enforcement result given
+ false, false, resource's url,
+ responseOrigin, coop and false. Let navigationParams be a new navigation params whose request is null, response is resource, origin is responseOrigin, final sandboxing flag set is
finalSandboxFlags, cross-origin opener
- policy is " Run process a navigate response with navigationType, the
@@ -83388,6 +84294,13 @@ interface Location { // but see also sandboxing
flags Let coopEnforcementResult be a new is a new cross-origin opener policy enforcement result given
+ false, false, resource's url,
+ activeDocumentNavigationOrigin, browsingContext's active
+ document's cross-origin opener policy and
+ false. Let navigationParams be a new navigation params whose request is resource, response is response, Location { // but see also cross-origin opener
policy is browsingContext's active document's cross-origin opener policy, COOP enforcement result is
+ coopEnforcementResult, reserved environment is null, browsing context is
- browsingContext, browsing
- context switch needed is false, and history
+ browsingContext, and history
handling is historyHandling. Run process a navigate response with navigationType, the
@@ -83502,20 +84416,25 @@ interface Location { // but see also cross-origin opener policy enforcement resultrequire-corp
" and
responsePolicy's value is "unsafe-none
", then queue a cross-origin embedder policy
@@ -81326,7 +82221,7 @@ interface BarProp {
require-corp
" and policy's
value is "unsafe-none
", then queue a cross-origin embedder policy
@@ -83156,16 +84051,19 @@ interface Location { // but see also cross-origin opener policy
Document
Document
unsafe-none
", is coop, COOP enforcement result is
+ coopEnforcementResult, reserved environment is null, browsing context is
- browsingContext, browsing
- context switch needed is false, and history
+ browsingContext, and history
handling is historyHandling.
Let finalSandboxFlags be an empty sandboxing flag set.
Let responseCOOP be "unsafe-none
".
While true:
@@ -83619,7 +84538,8 @@ interface Location { // but see also If sandboxFlags is not empty and responseCOOP's value is not "unsafe-none
", then set response to an
appropriate network error and break.
@@ -83630,8 +84550,10 @@ interface Location { // but see also enforcing the response's cross-origin opener policy given
- browsingContext, responseOrigin, responseCOOP, and
- coopEnforcementResult.Run process a navigate response with navigationType, the @@ -84061,17 +84981,14 @@ interface Location { // but see also browsing context.
If navigationParams's browsing context switch needed is true, then - set browsingContext to the result of the obtain a browsing context to use for a navigation - response algorithm, given browsingContext, navigationParams's final sandboxing flag set, and - navigationParams's cross-origin opener - policy.
Let browsingContext be the result of the obtaining a browsing context to use for a navigation + response given navigationParams's browsing context, + navigationParams's final sandboxing flag + set, navigationParams's cross-origin + opener policy, and navigationParams's COOP enforcement result.
Let permissionsPolicy be the result of creating a permissions policy from a
@@ -84705,12 +85622,13 @@ new PaymentRequest(…); // Allowed to use
data-x="navigation-params-origin">origin is a new opaque origin, final sandboxing flag set is an empty set, cross-origin opener policy is "unsafe-none
", reserved environment is null, cross-origin opener policy is a new cross-origin
+ opener policy, COOP enforcement
+ result is a new cross-origin opener policy
+ enforcement result, reserved environment is null, and browsing context is
- browsingContext, and browsing
- context switch needed is false.
The algorithm called in the next step is not prepared to deal with a null response. Probably we should synthesize one @@ -119253,6 +120171,30 @@ interface External { +
Cross-Origin-Opener-Policy-Report-Only
`This section describes a header for registration in the Permanent Message Header Field + Registry.
+ +Ping-From
`This section describes a header for registration in the Permanent Message Header Field
From 135f9041aa3f672cc54eef56db000fe768b78957 Mon Sep 17 00:00:00 2001
From: Camille Lamy
A browsing context has a virtual - browsing context group id integer. It is initially 0.
+ browsing context group ID integer. It is initially 0. This is used by cross-origin opener policy reporting, to keep track + of the browsing context group switches that would have happened if the report-only policy had been + enforced.A browsing context has an initial url, which is a URL or null. It is initially null.
@@ -77405,9 +77408,9 @@ popup4.close(); creator's URL, browsingContext's creator base URL to return creator's base URL, and browsingContext's virtual browsing context group id to + data-x="virtual-browsing-context-group-id">virtual browsing context group ID to creator's top-level browsing context's virtual browsing context group id.Let sandboxFlags be the result of determining the creation sandboxing flags given browsingContext and embedder.
Set browsingContext's virtual - browsing context group id to opener's top-level browsing context's + browsing context group ID to opener's top-level browsing context's virtual browsing context group - id.
Set browsingContext's opener origin at creation to opener's active document's @@ -81344,7 +81347,7 @@ interface BarProp {
If coopEnforcementResult's would need a browsing context group switch due to report-only is true, set browsing context's virtual browsing context group id to a new + data-x="virtual-browsing-context-group-id">virtual browsing context group ID to a new unique identifyer.
return browsingContext.
If accessor's top-level browsing context's virtual browsing context group id is + data-x="virtual-browsing-context-group-id">virtual browsing context group ID is accessed's top-level browsing context's virtual browsing context group id, + data-x="virtual-browsing-context-group-id">virtual browsing context group ID, return.
Let accessorCOOP be accessor's top-level browsing
From d755763dc8f9fe47337a43100fccb1f49b4cfd88 Mon Sep 17 00:00:00 2001
From: Camille Lamy
A browsing context has an initial - url, which is a URL or null. It is initially null.
+ URL, which is a URL or null. It is initially null.A browsing context has an opener origin at creation, which is an origin or null. It is initially null.
@@ -81230,8 +81230,8 @@ interface BarProp { isInitialAboutBlank to true.If isInitialAboutBlank is true and browsingContext's initial url is null, set - browsingContext's initial url to + data-x="browsing-context-initial-url">initial URL is null, set + browsingContext's initial URL to responseURL.
Check if an access between two browsing contexts - should be reported, given the current global object's browsing - context, W's browsing context, P, the current + should be reported, given the current global object's + browsing context, W's browsing context, P, the current global object, and the current settings object.
If ! IsPlatformObjectSameOrigin(W) is true, then return ?
From 0e5310b11fe03f4b0016333c6f955a9f7759178a Mon Sep 17 00:00:00 2001
From: Camille Lamy A cross-origin opener policy consists of: A value, which is a cross-origin opener policy value, initially " A report-only reporting endpoint,
which is a string or null, initially null. To match cross-origin opener policy values, given a
cross-origin opener policy value A, an origin
@@ -81031,7 +81031,7 @@ interface BarProp {
data-x="concept-response-header-list">header list.
+
+
unsafe-none
".
If parsedItem is neither failure nor null, then:
+If parsedItem is not null, then:
same-origin-plus-COEP
".Else, set policy's value to " Otherwise, set policy's value to "same-origin
".
If parsedItem[1]["report-to
"] exists and it is a string, then set exists and it is a string, then set policy's reporting endpoint to
parsedItem[1]["report-to
"].
If parsedItem is neither failure nor null, then:
+If parsedItem is not null, then:
Else, set policy's report-only
- value to "same-origin
".
Otherwise, set policy's report-only value to "same-origin
".
same-origin-allow-popups
".
If parsedItem[1]["report-to
"] exists and it is a string, then set exists and it is a string, then set policy's report-only reporting endpoint to
parsedItem[1]["report-to
"].
If the result of matching activeDocumentCOOPValue, activeDocumentNavigationOrigin, - responseCOOPValue and responseOrigin is true, return + responseCOOPValue, and responseOrigin is true, return false.
isInitialAboutBlank,
activeDocumentCOOPValue's value is
- "same-origin-allow-popups
", and
same-origin-allow-popups
".
responseCOOPValue is "unsafe-none
",
Let newCOOPEnforcementResult be a new cross-origin opener policy enforcement result given + data-x="coop-enforcement-result">cross-origin opener policy enforcement result whose needs a browsing context group switch is currentCOOPEnforcementResult's needs a - browsing context group switch, currentCOOPEnforcementResult's would need a browsing context group switch due to - report-only, responseURL, responseOrigin, responseCOOP, - and true.
Let isInitialAboutBlank be false.
If responseCOOP's reporting
- endpoint is not null and result's needs a browsing context group switch is true, queue a violation report for browsing context group switch
- when navigating to a COOP response with responseCOOP's reporting endpoint, responseCOOP's
- value, "enforce
",
- responseURL, currentCOOPEnforcementResult's url, and referrer.
If currentCOOPEnforcementResult's cross-origin opener policy's reporting endpoint is not null,
- Queue a violation report for browsing context
- group switch when navigating when navigating away from a COOP response with
- activeDocumentCOOP's reporting
- endpoint, currentCOOPEnforcementResult's cross-origin opener policy's value, "enforce
",
+
Queue a violation report for browsing
+ context group switch when navigating to a COOP response with responseCOOP,
+ "enforce
", responseURL,
+ currentCOOPEnforcementResult's url, and
+ referrer.
Queue a violation report for browsing
+ context group switch when navigating when navigating away from a COOP response with
+ activeDocumentCOOP, "enforce
",
currentCOOPEnforcementResult's url,
responseURL, and currentCOOPEnforcementResult's current context is navigation source.
If responseCOOP's reporting
- endpoint is not null and result's needs a browsing context group switch is true, queue a violation report for browsing context group switch
- when navigating to a COOP response with responseCOOP's report-only reporting endpoint,
- responseCOOP's report-only
- value, "reporting
", responseURL,
+
Queue a violation report for browsing context group switch
+ when navigating to a COOP response with responseCOOP, "reporting
", responseURL,
currentCOOPEnforcementResult's url, and
referrer.
If currentCOOPEnforcementResult's cross-origin opener policy's report-only reporting endpoint is not
- null, Queue a violation report for browsing
+ Queue a violation report for browsing
context group switch when navigating when navigating away from a COOP response with
- activeDocumentCOOP's report-only
- reporting endpoint, currentCOOPEnforcementResult's cross-origin opener policy's report-only value, "reporting
", currentCOOPEnforcementResult's url, responseURL, and
- currentCOOPEnforcementResult's current
- context is navigation source.reporting
",
+ currentCOOPEnforcementResult's url,
+ responseURL, and currentCOOPEnforcementResult's current context is navigation source.
To queue a violation report for browsing context group - switch when navigating to a COOP response given a string endpoint, a cross-origin opener policy value - coopValue, a string disposition, a URL coopURL, a - URL previousResponseURL, and a referrer - referrer:
+ switch when navigating to a COOP response given a cross-origin opener policy coop, a string disposition, a + URL coopURL, a URL previousResponseURL, and a referrer referrer:If coop's reporting endpoint + is null, return.
Let body be a new object containing the following properties:
@@ -81581,7 +81561,7 @@ interface BarProp {To queue a violation report for browsing context group - switch when navigating away from a COOP response given a string endpoint, a cross-origin opener policy value - coopValue, a string disposition, a URL coopURL, a - URL nextResponseURL, and a boolean + switch when navigating away from a COOP response given a cross-origin opener policy coopValue, a string disposition, a + URL coopURL, a URL nextResponseURL, and a boolean isCOOPResponseNavigationSource:
If coop's reporting endpoint + is null, return.
Let body be a new object containing the following properties:
@@ -81631,7 +81612,7 @@ interface BarProp {Queue a violation report for browsing
- context group switch when navigating when navigating away from a COOP response with
+ context group switch when navigating away from a COOP response with
activeDocumentCOOP, "enforce
",
currentCOOPEnforcementResult's url,
responseURL, and currentCOOPEnforcementResult's BarProp {
referrer.
Queue a violation report for browsing
- context group switch when navigating when navigating away from a COOP response with
+ context group switch when navigating away from a COOP response with
activeDocumentCOOP, "reporting
",
currentCOOPEnforcementResult's url,
responseURL, and currentCOOPEnforcementResult's BarProp {
data-x="coop-enforcement-bcg-switch-report-only">would need a browsing context group switch due
to report-only is true, set browsing context's virtual browsing context group ID to a new
- unique identifyer.
return browsingContext.
Return browsingContext.
To check if an access between two browsing contexts should be reported, given two browsing contexts - accessor and accessed, an array index property name + accessor and accessed, a JavaScript property name P, a global object globalObject, and an environment environement:
If P is not part of CrossOriginProperties, return.
If P is not part of CrossOriginProperties, then return.
If accessor or any of its ancestors are not same origin with its - top-level browsing context, or if accessed or any of its ancestors are not same origin with its - top-level browsing context, return.
+If accessor's active document's origin or any of its + ancestors's active document's + origin are not same origin with its top-level browsing + context's active document's origin, or if accessed's + active document's origin or any of its ancestors's active document's origin are not same + origin with its top-level browsing context's active document's + origin, then return.
This avoids leaking information about cross-origin iframes to a top level frame with cross-origin opener policy reporting
@@ -81406,7 +81409,7 @@ interface BarProp {If accessor's top-level browsing context's virtual browsing context group ID is accessed's top-level browsing context's virtual browsing context group ID, + data-x="virtual-browsing-context-group-id">virtual browsing context group ID, then return.
Let accessorCOOP be accessor's top-level browsing @@ -81423,7 +81426,7 @@ interface BarProp { data-x="coop-violation-access-to-opener">queue a violation report for access to the opener, given accessorCOOP's report-only reporting - endpoint,accessorCOOP's , accessorCOOP's report-only value, accessor's active document's URL, accessed's active document's BarProp { data-x="dom-document-referrer">referrer, globalObject, and environment.
Else, if accessed's opener browsing context is +
Otherwise, if accessed's opener browsing context is accessor or an ancestor of accessor, queue a violation report for access to an opened window, given accessorCOOP's BarProp { browsing context's opener origin at creation, P, globalObject, and environment.
Else, queue a violation report for access
- to another window, given accessorCOOP's Otherwise, queue a violation report for
+ access to another window, given accessorCOOP's report-only reporting
endpoint,accessorCOOP's report-only value, accessor's
active document's URL,
accessed's active document's URL, accessor's
- active document's origin, accessed's active
- document's origin, P, globalObject, and
- environment.
Else, if accessor's opener browsing context is +
Otherwise, if accessor's opener browsing context is accessed or an ancestor of accessed, queue a violation report for access from an opened window, given accessedCOOP's BarProp { browsing context's opener origin at creation, and P.
Else, queue a violation report for
+ Otherwise, queue a violation report for
access from another window, given accessedCOOP's report-only reporting
endpoint,accessedCOOP's
Date: Wed, 28 Oct 2020 17:32:59 +0100
Subject: [PATCH 09/15] Change access reporting
---
source | 341 +++++++++++++++++++++++++++++++++------------------------
1 file changed, 196 insertions(+), 145 deletions(-)
diff --git a/source b/source
index 05f4c57b893..33d5bd68417 100644
--- a/source
+++ b/source
@@ -81383,6 +81383,27 @@ interface BarProp {
An accessor-accessed relationship is an enum that describes the relationship between
+ two browsing contexts between which an access hapenned. It
+ can take the following values: The accessor browsing context or one of its ancestors is the opener browsing context of the accessed
+ browsing context's top-level browsing context. The accessed browsing context or one of its ancestors is the opener browsing context of the accessor
+ browsing context's top-level browsing context. There is no opener relationship between the accessor browsing context, the
+ accessor browsing context, or any of their ancestors. To check if an access between two browsing contexts
should be reported, given two browsing contexts
accessor and accessed, a JavaScript property name
@@ -81412,112 +81433,40 @@ interface BarProp {
data-x="virtual-browsing-context-group-id">virtual browsing context group ID Let accessorCOOP be accessor's top-level browsing
- context's active document's cross-origin
- opener policy. Let accessorAccessedRelationship be a new accessor-accessed
+ relationship with value none. If accessorCOOP's report-only
- reporting endpoint is not null, then: If accessed's top-level browsing context's opener browsing
+ context is accessor or an ancestor of accessor, then set accessorAccessedRelationship to
+ accessor is opener. If accessor's opener browsing context is accessed or
- an ancestor of accessed, queue a violation report for access to the
- opener, given accessorCOOP's report-only reporting
- endpoint, accessorCOOP's report-only value, accessor's
- active document's URL,
- accessed's active document's URL, accessor's
- active document's origin, accessed's active
- document's origin, P, accessor's top-level
- browsing context's active document's referrer, globalObject, and
- environment. If accessor's top-level browsing context's opener browsing
+ context is accessed or an ancestor of accessed, then set accessorAccessedRelationship to
+ accessor is openee. Otherwise, if accessed's opener browsing context is
- accessor or an ancestor of
- accessor, queue a violation report
- for access to an opened window, given accessorCOOP's report-only reporting
- endpoint,accessorCOOP's report-only value, accessor's
- active document's URL,
- accessed's active document's URL, accessed's top-level browsing
- context's initial URL,
- accessor's active document's origin, accessed's
- active document's origin, accessed's top-level
- browsing context's opener origin at
- creation, P, globalObject, and environment. Otherwise, queue a violation report for
- access to another window, given accessorCOOP's report-only reporting
- endpoint,accessorCOOP's report-only value, accessor's
- active document's URL,
- accessed's active document's URL, accessor's active document's
- origin, accessed's active document's origin,
- P, globalObject, and environment.Reporting
+
+
+
-
-
Let accessedCOOP be accessed's top-level browsing
+ Queue violation reports for accesses, given
+ accessorAccessedRelationship, accessor's top-level browsing
context's active document's cross-origin
- opener policy. If accessedCOOP's report-only
- reporting endpoint is not null, then:
If accessed's opener browsing context is accessor or - an ancestor of accessor, queue a violation report for access from the - opener, given accessedCOOP's report-only reporting - endpoint,accessedCOOP's report-only value, accessed's - active document's URL, - accessor's active document's URL, accessed's - active document's origin, accessor's active - document's origin, P, and accessed's top-level - browsing context's active document's referrer.
Otherwise, if accessor's opener browsing context is - accessed or an ancestor of - accessed, queue a violation report - for access from an opened window, given accessedCOOP's report-only reporting - endpoint,accessedCOOP's report-only value, accessed's - active document's URL, - accessor's active document's URL, accessor's top-level browsing - context's initial URL, - accessed's active document's origin, accessor's - active document's origin, accessor's top-level - browsing context's opener origin at - creation, and P.
Otherwise, queue a violation report for - access from another window, given accessedCOOP's report-only reporting - endpoint,accessedCOOP's report-only value, accessed's - active document's URL, - accessor's active document's URL, accessed's - active document's origin, accessor's active - document's origin, and P.
To sanitize a URL to send in a report given a @@ -81546,6 +81495,13 @@ interface BarProp {
If coop's reporting endpoint is null, return.
Let coopValue be coop's value.
If disposition is "reporting
, then set
+ coopValue to coop's report-only value.
Let body be a new object containing the following properties:
@@ -81563,7 +81519,7 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL.
To queue a violation report for browsing context group switch when navigating away from a COOP response given a cross-origin opener policy coopValue, a string disposition, a + policy">cross-origin opener policy coop, a string disposition, a URL coopURL, a URL nextResponseURL, and a boolean isCOOPResponseNavigationSource:
@@ -81597,6 +81554,13 @@ interface BarProp {If coop's reporting endpoint is null, return.
Let coopValue be coop's value.
If disposition is "reporting
, then set
+ coopValue to coop's report-only value.
Let body be a new object containing the following properties:
@@ -81614,7 +81578,7 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL.
To queue violation reports for accesses, given an + accessor-accessed relationship accessorAccessedRelationship, two + cross-origin opener policies + accessorCOOP and accessedCOOP, four urls + accessorURL, accessedURL, accessorInitialURL, + accessedInitialURL, four origins + accessorOrigin, accessedOrigin, accessorCreatorOrigin and + accessedCreatorOrigin, two referrers + accessorReferrer and accessedReferrer, a string propertyName, a + global object globalObject, and an environment settings + object environment:
+ +If coop's reporting endpoint + is null, return.
Let coopValue be coop's value.
If disposition is "reporting
, then set
+ coopValue to coop's report-only value.
If accessorAccessedRelationship is accessor is opener:
+ +Queue a violation report + for access to an opened window, given accessorCOOP, accessorURL, + accessedURL, accessedInitialURL, accessorOrigin, + accessedOrigin, accessedCreatorOrigin, propertyName, + globalObject, and environment.
Queue a violation report for access + from the opener, given accessedCOOP, accessedURL, + accessorURL, accessedOrigin, accessorOrigin, + propertyName, and accessedReferrer.
Otherwise, if accessorAccessedRelationship is accessor is openee:
+ +Queue a violation report for access to + the opener, given accessorCOOP, accessorURL, + accessedURL, accessorOrigin, accessedOrigin, + propertyName, accessorReferrer, globalObject, and + environment.
Queue a violation report for access + from an opened window, given accessedCOOP, accessedURL, + accessorURL, accessorInitialURL, accessedOrigin, + accessorOrigin, accessorCreatorOrigin, and + propertyName.
Otherwise:
+ +Queue a violation report for + access to another window, given accessorCOOP, accessorURL, + accessedURL, accessorOrigin, accessedOrigin, + propertyName, globalObject, and environment
Queue a violation report for + access from another window, given accessedCOOP, accessedURL, + accessorURL, accessedOrigin, accessorOrigin, and + propertyName.
To queue a violation report for access to the - opener, given a string endpoint, a cross-origin opener policy value - coopValue, two URLs coopURL and + opener, given a cross-origin opener + policy coop, two URLs coopURL and openerURL, two origins coopOrigin and openerOrigin, a string propertyName, a referrer referrer, a global @@ -81646,7 +81687,6 @@ interface BarProp { environment:
Let body be a new object containing the following properties:
@@ -81664,7 +81704,8 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL and environment.
To queue a violation report for access to an - opened window, given a string endpoint, a cross-origin opener policy value - coopValue, three URLs coopURL, + opened window, given a cross-origin opener + policy coop, three URLs coopURL, openedWindowURL and initialWindowURL, three origins coopOrigin, openedWindowOrigin, and - openerInitialOrigin,a string propertyName, a global - object globalObject, and an environment settings object + openerInitialOrigin,a string propertyName, a global object + globalObject, and an environment settings object environment:
Let body be a new object containing the following properties:
@@ -81733,7 +81773,8 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL and environment.
To queue a violation report for access to another - window, given a string endpoint, a cross-origin opener policy value - coopValue, two URLs coopURL and + window, given a cross-origin opener policy + coop, two URLs coopURL and otherURL, two origins coopOrigin and - otherOrigin, a string propertyName, a global - object globalObject, and an environment settings object + otherOrigin, a string propertyName, a global object + globalObject, and an environment settings object environment:
Let body be a new object containing the following properties:
@@ -81804,7 +81844,8 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL and environment.
To queue a violation report for access from the - opener, given a string endpoint, a cross-origin opener policy value - coopValue, two URLs coopURL and + opener, given a cross-origin opener policy + coop, two URLs coopURL and openerURL, two origins coopOrigin and openerOrigin, a string propertyName, and a referrer referrer:
If coop's reporting endpoint + is null, return.
Let body be a new object containing the following properties:
@@ -81867,7 +81910,8 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL.
To queue a violation report for access from an - opened window, given a string endpoint, a cross-origin opener policy value - coopValue, three URLs coopURL, + opened window, given a cross-origin opener + policy coop, three URLs coopURL, openedWindowURL and initialWindowURL, three origins coopOrigin, openedWindowOrigin, and openerInitialOrigin, and a string propertyName:
If coop's reporting endpoint + is null, return.
Let body be a new object containing the following properties:
@@ -81926,7 +81972,8 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL.
To queue a violation report for access from another - window, given a string endpoint, a cross-origin opener policy value - coopValue, two URLs coopURL and - otherURL, two origins coopOrigin and - otherOrigin, and a string propertyName:
+ window, given a cross-origin opener policy + coop, two URLs coopURL and otherURL, two + origins coopOrigin and otherOrigin, and a string + propertyName:If coop's reporting endpoint + is null, return.
Let body be a new object containing the following properties:
@@ -81979,7 +82028,8 @@ interface BarProp {Queue body as "coop
"
- for endpoint with coopURL.
Queue a violation report for browsing
context group switch when navigating to a COOP response with responseCOOP,
"enforce
", responseURL,
- currentCOOPEnforcementResult's url, and
+ currentCOOPEnforcementResult's url,
+ currentCOOPEnforcementResult's origin, responseOrigin, and
referrer.
Queue a violation report for browsing
context group switch when navigating away from a COOP response with
activeDocumentCOOP, "enforce
",
currentCOOPEnforcementResult's url,
- responseURL, and currentCOOPEnforcementResult's current context is navigation source.
reporting
", responseURL,
- currentCOOPEnforcementResult's url, and
- referrer.
+ currentCOOPEnforcementResult's url,
+ currentCOOPEnforcementResult's origin,
+ responseOrigin,and referrer.
Queue a violation report for browsing
context group switch when navigating away from a COOP response with
activeDocumentCOOP, "reporting
",
currentCOOPEnforcementResult's url,
- responseURL, and currentCOOPEnforcementResult's current context is navigation source.
To queue a violation report for browsing context group switch when navigating to a COOP response given a cross-origin opener policy coop, a string disposition, a - URL coopURL, a URL previousResponseURL, and a referrer referrer:
+ URL coopURL, a URL previousResponseURL, two origins coopOrigin and previousResponseOrigin, and a + referrer referrer:If coop's reporting endpoint @@ -81518,22 +81526,22 @@ interface BarProp {
navigation-to-response
To queue a violation report for browsing context group switch when navigating away from a COOP response given a cross-origin opener policy coop, a string disposition, a - URL coopURL, a URL nextResponseURL, and a boolean + URL coopURL, a URL nextResponseURL, two origins coopOrigin and nextResponseOrigin, and a boolean isCOOPResponseNavigationSource:
navigation-to-response
access-to-opener
access-to-opener
access-to-opener
access-to-opener
access-to-opener
access-to-opener
Check if an access between two browsing contexts should be reported, given the current global object's browsing context, W's browsing context, P, the current - global object, and the current settings object.
If ! IsPlatformObjectSameOrigin(W) is true, then return ? OrdinaryGet(this, P, Receiver).
To check if an access between two browsing contexts should be reported, given two browsing contexts accessor and accessed, a JavaScript property name - P, a global object globalObject, and an - environment environement:
+ P, and an environment environement:If P is not part of CrossOriginProperties, then return.
If coop's reporting endpoint @@ -81641,7 +81639,7 @@ interface BarProp { for access to an opened window, given accessorCOOP, accessorURL, accessedURL, accessedInitialURL, accessorOrigin, accessedOrigin, accessedCreatorOrigin, propertyName, - globalObject, and environment.
Queue a violation report for access from the opener, given accessedCOOP, accessedURL, @@ -81658,8 +81656,7 @@ interface BarProp {
Queue a violation report for access to the opener, given accessorCOOP, accessorURL, accessedURL, accessorOrigin, accessedOrigin, - propertyName, accessorReferrer, globalObject, and - environment.
Queue a violation report for access from an opened window, given accessedCOOP, accessedURL, @@ -81676,7 +81673,7 @@ interface BarProp {
Queue a violation report for access to another window, given accessorCOOP, accessorURL, accessedURL, accessorOrigin, accessedOrigin, - propertyName, globalObject, and environment
Queue a violation report for access from another window, given accessedCOOP, accessedURL, @@ -81691,11 +81688,13 @@ interface BarProp { policy coop, two URLs coopURL and openerURL, two origins coopOrigin and openerOrigin, a string propertyName, a referrer referrer, a global - object globalObject, and an environment settings object - environment:
+ data-x="concept-request-referrer">referrer referrer, and an environment + settings object environment:Let sourceFile, lineNumber and columnNumber be the + relevant script URL and problematic position which triggered this report.
Let body be a new object containing the following properties:
@@ -81732,15 +81731,15 @@ interface BarProp {Let sourceFile, lineNumber and columnNumber be the + relevant script URL and problematic position which triggered this report.
Let body be a new object containing the following properties:
@@ -81803,15 +81804,15 @@ interface BarProp {Let sourceFile, lineNumber and columnNumber be the + relevant script URL and problematic position which triggered this report.
Let body be a new object containing the following properties:
@@ -81868,15 +81871,15 @@ interface BarProp {To obtain a browsing context to use for a navigation response, given a browsing contexts browsingContext, a sandboxing flag set sandboxFlags, a - cross-origin opener policy navigationCOOP and a cross-origin opener policy navigationCOOP, and a cross-origin opener policy enforcement result coopEnforcementResult:
@@ -81391,8 +81391,8 @@ interface BarProp {An accessor-accessed relationship is an enum that describes the relationship between - two browsing contexts between which an access hapenned. It - can take the following values:
+ two browsing contexts between which an access happened. It + can take the following values:To check if an access between two browsing contexts should be reported, given two browsing contexts accessor and accessed, a JavaScript property name - P, and an environment environement:
+ P, and an environment environment:If P is not part of CrossOriginProperties, then return.
If accessor's active document's origin or any of its - ancestors's active document's - origin are not same origin with its top-level browsing - context's active document's origin, or if accessed's - active document's origin or any of its ancestors's active document's origin are not same - origin with its top-level browsing context's active document's - origin, then return.
+ ancestors' active document's origins are not same origin with ancestor's + top-level browsing context's active document's origin, or + if accessed's active document's origin or any of its ancestors' active document's origins are not same origin with accessed's + top-level browsing context's active document's origin, + then return.This avoids leaking information about cross-origin iframes to a top level frame with cross-origin opener policy reporting
@@ -81505,7 +81506,7 @@ interface BarProp {Let coopValue be coop's value.
If disposition is "reporting
, then set
+
If disposition is "reporting
", then set
coopValue to coop's report-only value.
Let coopValue be coop's value.
If disposition is "reporting
, then set
+
If disposition is "reporting
", then set
coopValue to coop's report-only value.
To queue violation reports for accesses, given an accessor-accessed relationship accessorAccessedRelationship, two cross-origin opener policies - accessorCOOP and accessedCOOP, four urls + accessorCOOP and accessedCOOP, four URLs accessorURL, accessedURL, accessorInitialURL, accessedInitialURL, four origins accessorOrigin, accessedOrigin, accessorCreatorOrigin and @@ -81626,7 +81627,7 @@ interface BarProp {
Let coopValue be coop's value.
If disposition is "reporting
, then set
+
If disposition is "reporting
", then set
coopValue to coop's report-only value.
Origin-Isolation
`Cross-Origin-Opener-Policy-Report-Only
`This section describes a header for registration in the Permanent Message Header Field Registry.
Cross-Origin-Opener-Policy-Report-Only
`Origin-Isolation
`This section describes a header for registration in the Permanent Message Header Field Registry.
Check if an access between two browsing contexts should be reported, given the current global object's browsing - context, W's browsing context, P, the current - global object and the current settings object.
If ! IsPlatformObjectSameOrigin(W) is true, then return ? OrdinarySet(this, P, V, Receiver).
To check if an access between two browsing contexts should be reported, given two browsing contexts accessor and accessed, a JavaScript property name - P, and an environment environment:
+ P, and an environment settings object environment:If P is not part of CrossOriginProperties, then return.
Let serializedReferrer be an empty string
If referrer is a URL, set serializedReferrer to the + serialization of referrer. +
Let body be a new object containing the following properties:
@@ -81537,11 +81542,11 @@ interface BarProp {navigation-to-response
navigation-to-response
"navigation-to-response
navigation-to-response
"Let sourceFile, lineNumber and columnNumber be the relevant script URL and problematic position which triggered this report.
Let serializedReferrer be an empty string
If referrer is a URL, set serializedReferrer to the + serialization of referrer. +
Let body be a new object containing the following properties:
@@ -81728,7 +81738,7 @@ interface BarProp {access-to-opener
access-to-opener
"access-to-opener
access-to-opener
"access-to-opener
access-to-opener
"If coop's reporting endpoint is null, return.
Let serializedReferrer be an empty string
If referrer is a URL, set serializedReferrer to the + serialization of referrer. +
Let body be a new object containing the following properties:
@@ -81938,11 +81953,11 @@ interface BarProp {access-to-opener
access-to-opener
"access-to-opener
access-to-opener
"Let coopEnforcementResult be a new cross-origin opener policy enforcement result whose + needs a browsing context group switch is + false, would need a browsing context + group switch due to report-only is false,url is resource's url, origin + is responseOrigin, cross-origin opener policy is coop, and + current context is navigation source is + false.
Let navigationParams be a new navigation params whose request is null, Location { // but see also sandboxing flags and response's forced sandboxing flag set.
Let coopEnforcementResult be a new is a new cross-origin opener policy enforcement result given - false, false, resource's url, - activeDocumentNavigationOrigin, browsingContext's active - document's cross-origin opener policy and +
Let coopEnforcementResult be a new cross-origin opener policy enforcement result whose + needs a browsing context group switch is + false, would need a browsing context + group switch due to report-only is false,url is resource's url, origin + is activeDocumentNavigationOrigin, cross-origin opener policy is + browsingContext's active document's cross-origin opener policy, and current context is navigation source is false.
Let navigationParams be a new navigation params whose
Date: Thu, 19 Nov 2020 14:34:40 +0100
Subject: [PATCH 14/15] Address Domenic's comments
---
source | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/source b/source
index 44d2903b407..161e045a9ed 100644
--- a/source
+++ b/source
@@ -78511,6 +78511,14 @@ console.assert(iframeWindow.frameElement === null);
{ [[Property]]: "postMessage
" } ».
A JavaScript property name P is a cross-origin accessible window property
+ name if it is "window
", "self
", "location
", "close
", "closed
",
+ "focus
", "blur
", "frames
",
+ "length
", "top
", "opener
",
+ "parent
", "postMessage
", or an array indexed
+ property name.
Indexed properties do not need to be safelisted as they are handled directly by
the WindowProxy
object.
If browsingContext's browsing context group's browsing
+ If browsingContext's group's browsing
context set's size is greater than 1, then:
@@ -81296,7 +81304,7 @@ interface BarProp {
need a browsing context group switch due to report-only
to true.
If browsingContext's browsing context group's browsing
+ If browsingContext's group's browsing
context set's size is greater than 1, then:
@@ -81417,7 +81425,8 @@ interface BarProp {
P, and an environment settings object environment:
If P is not part of CrossOriginProperties, then return.
If P is not a cross-origin accessible window property name, then + return.
If accessor's active document's origin or any of its
@@ -84331,7 +84340,7 @@ interface Location { // but see also cross-origin opener policy enforcement result whose
needs a browsing context group switch is
false, would need a browsing context
- group switch due to report-only is false, is false, url is resource's url, origin
is responseOrigin, Location { // but see also cross-origin opener policy enforcement result whose
needs a browsing context group switch is
false, would need a browsing context
- group switch due to report-only is false, is false, url is resource's url, origin
is activeDocumentNavigationOrigin,
Date: Thu, 19 Nov 2020 16:28:46 -0500
Subject: [PATCH 15/15] Tweak to COA window property definition
---
source | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/source b/source
index 161e045a9ed..62a4771dff2 100644
--- a/source
+++ b/source
@@ -78511,16 +78511,16 @@ console.assert(iframeWindow.frameElement === null);
{ [[Property]]: "postMessage
" } ».
Indexed properties do not need to be safelisted in this algorithm, as they are
+ handled directly by the WindowProxy
object.
A JavaScript property name P is a cross-origin accessible window property
name if it is "window
", "self
", "location
", "close
", "closed
",
"focus
", "blur
", "frames
",
"length
", "top
", "opener
",
- "parent
", "postMessage
", or an array indexed
- property name.
Indexed properties do not need to be safelisted as they are handled directly by
- the WindowProxy
object.
parent
", "postMessage
", or an array index
+ property name.