JSON parser breaking sniffing in XSDB can theoretically block valid text/css responses |
|||
Issue description
It is possible to craft a text/css response that
1) contains a JSON parser breaker at the beginning
2) is still parsing fine as a stylesheet
For example:
)]}'
{}
h1 { color: red; }
We should tweak XSDB's implementation so that it doesn't block such responses.
,
Feb 6 2018
Hmm, sorry, maybe I misunderstood this bug, and it's about cases that have correct Content-Type headers but also have JSON parser breakers inside them. If so, please disregard my previous comment.
,
Feb 6 2018
WIP CL @ https://chromium-review.googlesource.com/905634 RE: #c2 - yes this bug is about stylesheets served with the correct text/css MIME, but possibly blocked by XSDB because of JSON parser breaker at the beginning.
,
Feb 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/984653dce0cb862eef0753d6f1e08932ed61cde9 commit 984653dce0cb862eef0753d6f1e08932ed61cde9 Author: Lukasz Anforowicz <lukasza@chromium.org> Date: Fri Feb 09 21:45:35 2018 XSDB: don't sniff for JSON parser breaker in text/css responses. Bug: 809259 Change-Id: I0b05c2955cf25e049c1558dc40e86b5e8e144371 Reviewed-on: https://chromium-review.googlesource.com/905634 Commit-Queue: Ćukasz Anforowicz <lukasza@chromium.org> Reviewed-by: Nick Carter <nick@chromium.org> Cr-Commit-Position: refs/heads/master@{#535838} [modify] https://crrev.com/984653dce0cb862eef0753d6f1e08932ed61cde9/content/browser/loader/cross_site_document_resource_handler.cc [modify] https://crrev.com/984653dce0cb862eef0753d6f1e08932ed61cde9/content/browser/loader/cross_site_document_resource_handler.h [add] https://crrev.com/984653dce0cb862eef0753d6f1e08932ed61cde9/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/README.md [add] https://crrev.com/984653dce0cb862eef0753d6f1e08932ed61cde9/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/css-with-json-parser-breaker.sub.html [add] https://crrev.com/984653dce0cb862eef0753d6f1e08932ed61cde9/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/resources/css-with-json-parser-breaker.css
,
Feb 9 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by domenic@chromium.org
, Feb 6 2018