Revision 4c8580c189ce4501997af80b599bea070b1a7299 authored by Ian Clelland on 13 April 2018, 01:59:02 UTC, committed by Philip Jägenstedt on 13 April 2018, 12:05:15 UTC
Currently, policy-controlled features do not work as expected in
frames with opaque origins, such as isolated sandboxes and data: URLs,
because the eventual opaque origin of the frame is not known when the
HTMLFrameOwnerElement builds the container policy, and so has no way
to tell the browser that a particular origin should be allowed.

This CL adds a new member to the ParsedFeaturePolicyDeclaration, which
indicates that the iframe policy is expected to apply to the origin of
the frame, and is used when that frame has an opaque origin. This can
be triggered with an iframe of the form

<iframe sandbox allow="feature">

or

<iframe sandbox allow="feature src">

This flag is checked when building the feature policy in the new frame,
and ensures that the new feature policy will allow the feature in that
origin.

This is the first part of the eventual solution -- currently this has
the effect of allowing the feature even if a sandboxed frame navigates
to a new page (causing a new opaque origin to be created for it).
Subsequent CLs will add a unique identified to each such origin, and
ensure that the generated policies are properly tied to the specific
origin of the frame.

Bug: 690520
Change-Id: Ie18b9bc3c36be6550baf5a03e355871b9589fd40
Reviewed-on: https://chromium-review.googlesource.com/963382
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550463}
1 parent 1dd03e7
History
File Mode Size
broadcastchannel
message-channels
support
with-ports
without-ports
Channel_postMessage_Blob.htm -rw-r--r-- 1.3 KB
Channel_postMessage_DataCloneErr.htm -rw-r--r-- 636 bytes
Channel_postMessage_clone_port.htm -rw-r--r-- 1.3 KB
Channel_postMessage_clone_port_error.htm -rw-r--r-- 656 bytes
Channel_postMessage_event_properties.htm -rw-r--r-- 1.0 KB
Channel_postMessage_ports_readonly_array.htm -rw-r--r-- 1.0 KB
Channel_postMessage_target_source.htm -rw-r--r-- 906 bytes
MessageEvent-trusted-worker.js -rw-r--r-- 98 bytes
MessageEvent-trusted.html -rw-r--r-- 1.2 KB
MessageEvent.html -rw-r--r-- 799 bytes
MessageEvent_onmessage_postMessage_infinite_loop.html -rw-r--r-- 1003 bytes
MessageEvent_properties.htm -rw-r--r-- 946 bytes
MessagePort_initial_disabled.htm -rw-r--r-- 446 bytes
MessagePort_onmessage_start.htm -rw-r--r-- 419 bytes
OWNERS -rw-r--r-- 48 bytes
README.md -rw-r--r-- 193 bytes
Transferred_objects_unusable.sub.htm -rw-r--r-- 1.6 KB
event.data.sub.htm -rw-r--r-- 1.7 KB
event.origin.sub.htm -rw-r--r-- 2.1 KB
event.ports.sub.htm -rw-r--r-- 1.5 KB
event.source.htm -rw-r--r-- 1.3 KB
event.source.xorigin.sub.htm -rw-r--r-- 1.5 KB
messageerror.html -rw-r--r-- 1.5 KB
postMessage_ArrayBuffer.sub.htm -rw-r--r-- 1.1 KB
postMessage_Date.sub.htm -rw-r--r-- 1.0 KB
postMessage_Document.htm -rw-r--r-- 882 bytes
postMessage_Function.htm -rw-r--r-- 888 bytes
postMessage_MessagePorts_sorigin.htm -rw-r--r-- 1.9 KB
postMessage_MessagePorts_xorigin.sub.htm -rw-r--r-- 2.0 KB
postMessage_arrays.sub.htm -rw-r--r-- 965 bytes
postMessage_asterisk_xorigin.sub.htm -rw-r--r-- 2.1 KB
postMessage_dup_transfer_objects.htm -rw-r--r-- 1.0 KB
postMessage_invalid_targetOrigin.htm -rw-r--r-- 1.1 KB
postMessage_objects.sub.htm -rw-r--r-- 1.0 KB
postMessage_origin_mismatch.sub.htm -rw-r--r-- 1.5 KB
postMessage_origin_mismatch_xorigin.sub.htm -rw-r--r-- 1.6 KB
postMessage_solidus_sorigin.htm -rw-r--r-- 1.1 KB
postMessage_solidus_xorigin.sub.htm -rw-r--r-- 1.4 KB

README.md

back to top