New issue
Advanced search Search tips

Issue 704904 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 623682
issue 682256



Sign in to add a comment

Feature policy container policy is based on the incorrect origin

Project Member Reported by iclell...@chromium.org, Mar 24 2017

Issue description

As specced, the container policy generated by an iframe with an allow attribute should refer to the origin of the URL in the iframe's src attribute

(See https://wicg.github.io/feature-policy/#iframe-allow-attribute)

The current implementation uses the origin of the document being loaded into the frame, which is correct on first load, but incorrect if the frame subsequently navigates without changing the src attribute.

We should snapshot the origin of the src attribute URL when it changes, and use that origin when the container policy is constructed.
 
Description: Show this description

Comment 2 by lunalu@chromium.org, Mar 24 2017

Blocking: 682256

Comment 3 by lunalu@chromium.org, Mar 24 2017

Status: Started (was: Assigned)
The currently plan is to store the value of srcAttr as KURL or string in FrameOwner and use that instead of SecurityOrigin when creating container policy.
We could store it as an actual SecurityOrigin, or as an absolute URL in a KURL.

Because src could be a relative URL, we will need to make sure that we are storing something that lets us get the actual origin when we need it.

Comment 5 by lunalu@chromium.org, Mar 24 2017

Make sense, I will look into the options. I guess we should use whatever is most efficient (memory-wise and speed-wise).

Comment 7 by rbyers@chromium.org, Jul 18 2017

Owner: loonyb...@chromium.org

Sign in to add a comment