CORB should block CSV, PDF and other MimeHandlerView types w/o sniffing. #16850
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This CL extends CORB to also cover CSV, PDF and other types handled by
MimeHandlerView. This protection is only turned on when the
kMimeHandlerViewInCrossProcessFrame feature is enabled, because
otherwise the resource body may need to go through a cross-origin
renderer process (see https://crbug.com/929300).
Manually tested by launching
$ out/rel/chrome --user-data-dir=$HOME/.corb-for-pdf
--enable-features=MimeHandlerViewInCrossProcessFrame
http://anforowicz.github.io/xsdb-demo/index.html
and verifying that DevTools console shows CORB warning for
<img src="https://www.w3.org/.../dummy.pdf">
Bug: 802836
Change-Id: Ia13a693d76f50aca52d6241af317d75c07e20b59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1606589
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662651}