OOPIFs: source and line numbers missing in http/tests/inspector/console-cross-origin-iframe-logging.html |
||||||
Issue description
Up until recently http/tests/inspector/console-cross-origin-iframe-logging.html would time out, but after recent DevTools fixes it started to complete with OOPIFs. Yay!
Unfortunately, this test now exposes a separate problem with OOPIFs. Renderers should not disclose any of their private information to other (potentially cross-origin) renderers. In particular we don't want to dislosed URLs from one renderer to another renderer (origins are okay).
Right now the information disclosure mitigations regress quality of console messages. For example in http/tests/inspector/console-cross-origin-iframe-logging.html we used to see the following error message:
console-cross-origin-iframe-logging.html:19 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://127.0.0.1:8000') does not match the recipient window's origin ('http://localhost:8000').
but with OOPIFs we only get:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://127.0.0.1:8000') does not match the recipient window's origin ('http://localhost:8000').
,
May 5 2017
,
May 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a1b65feb44e32a48ad7fb51384fa868bc864008 commit 9a1b65feb44e32a48ad7fb51384fa868bc864008 Author: lukasza <lukasza@chromium.org> Date: Fri May 05 18:27:23 2017 OOPIFs: Tweaking test expectations for http/tests/inspector layout tests. This CL tweaks test expectations for http/tests/inspector layout tests, to account for work that went into making DevTools support OOPIFs. These tests used to timeout but now are passing fine: http/tests/inspector/change-iframe-src.html virtual/mojo-loading/http/tests/inspector/change-iframe-src.html These tests expected a timeout but not are failing with a text diff (tracked by https://crbug.com/718940): http/tests/inspector/console-cross-origin-iframe-logging.html virtual/mojo-loading/http/tests/inspector/console-cross-origin-iframe-logging.html These tests are intermittently timing out locally and on Site Isolation Win FYI bot: http/tests/inspector-protocol/request-referrer-policy.html virtual/mojo-loading/http/tests/inspector-protocol/request-referrer-policy.html BUG=718940, 623268 NOTRY=true TEST=Run 10 times all http/tests/inspector tests covered by the expectations file. Review-Url: https://codereview.chromium.org/2855323005 Cr-Commit-Position: refs/heads/master@{#469730} [modify] https://crrev.com/9a1b65feb44e32a48ad7fb51384fa868bc864008/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
,
May 5 2017
Alexey is not the right owner here.
,
May 5 2017
nasko@ points out that maybe in both 1) post message case and 2) CSP frame-src / form-target cases, we could generate and send the console message directly from the browser to the dev tools process (rather than generating the console message in a renderer process). This might work, but please note: 1. With PlzNavigate the renderer should not be able to change the origin without the browser knowing first, so there should be no race here (i.e. if browser thinks that post message targets wrong origin, then it really does target a wrong origin [since the browser is supposed to know the origin of the target at all times]). OTOH: 1.1. The browser is not aware of suborigins (and I see that post message checks in LocalDOMWindow::DispatchMessageEventWithOriginCheck are suborigins-aware). 1.2. dcheng@ points out document.write (which AFAIU changes the origin of a document without the browser realizing). And some smaller issues / notes: 2. We have to also hook it up to BlinkTestController on the browser side. That seems doable. 3. For CSP this would mean doing part of the reporting (the console message) in the browser and part in the renderer (DOM event + report to the server declaring the CSP). This seems doable, although slightly icky.
,
Dec 11 2017
,
Dec 11 2017
,
Dec 5
I think we can use cross-target stack ids for this one. We already do something similar for worker.postMessage() api. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by lukasza@chromium.org
, May 5 2017