forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow an opaque url::Origin to remember where it came from.
The problem being solved here is that, although various web platform features can cause documents to be placed in opaque origins, sometimes doing so obscures the actual source of the documents, which itself can be a security risk. "data:" URLs, "srcdoc" plus "sandbox" are particular tricky cases of this, as neither the URL nor the committed origin retains information about which network host the content is originally from. This CL is the first step towards solving this problem by keeping that information around in url::Origin. It is just the url::Origin changes from nick@'s work on precursor origins started in https://crrev.com/c/1028985. The precursor information must be used carefully. Opaque origins should generally not inherit privileges from the origins they derive from. However, in some cases (such as restrictions on process placement, or determining the http lock icon, or determining content script injection) this information may be relevant to ensure that entering an opaque origin does not grant privileges initially denied to the original non-opaque origin. This new tracking is transitive: meaning if a page loaded from http://example.com navigates to a data URL, which then navigates to a blob:null URL, which embeds an <iframe sandbox srcdoc="...">, the precursor origin for the sandboxed iframe is retained to be "http://example.com". Bug: 882053 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: I021245c624b78f08bd835c5cae9fde7ec5e44b80 Reviewed-on: https://chromium-review.googlesource.com/1214745 Commit-Queue: Nasko Oskov <nasko@chromium.org> Reviewed-by: Ian Clelland <iclelland@chromium.org> Reviewed-by: Luna Lu <loonybear@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/master@{#591867}
- Loading branch information
1 parent
e642495
commit 9277dfc
Showing
15 changed files
with
689 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.