Misleading error message for clicks on links intended to do top-level navigation from a sandboxed iframe
Reported by
mserr...@dropbox.com,
Apr 6 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 Steps to reproduce the problem: 1. Visit http://mserranodbx.pythonanywhere.com/error_message - note that the iframe is sandboxed, the iframe has a base tag with target=_top, and that there's a link to google.com inside the iframe. Note that there is no JS present. 2. Click on the link, notice that the page doesn't navigate. This is expected, since there is no allow-top-navigation setting on the sandboxed iframe. 3. In the developer console, notice the error message: "Unsafe JavaScript attempt to initiate navigation for frame with URL 'http://mserranodbx.pythonanywhere.com/error_message' from frame with URL 'https://mserranodbx.pythonanywhere.com/frame'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set." which appears in spite of the attempt to initiate navigation not being JS-based. What is the expected behavior? I'd expect an error message that doesn't point towards JS, since that may lead developers to investigate their various event handlers or other possible sources of JS involvement to see where the actual problem lies. What went wrong? A somewhat misleading error message was produced, likely because the error is being raised at a point of shared code between different forms of navigation. Did this work before? N/A Chrome version: 65.0.3325.181 Channel: stable OS Version: OS X 10.12.6 Flash Version:
,
Apr 11 2018
mserrano@ Thanks for the issue. Able to reproduce the issue on Mac OS 10.13.3, Windows 10 and Ubuntu 14.04 on the latest Canary 67.0.3394.0 and Stable 65.0.3325.181. Can see the above given error message in Devtools -> Console on navigating to the given link and clicking on link in the iframe. Attached is the screen shot for reference. This is a Non-Regression issue as this behavior is observed from M60 Chrome builds. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
Apr 16 2018
,
Apr 17 2018
I agree that it probably makes sense to change that string. Dropping the word "JavaScript" might be enough. |
||||
►
Sign in to add a comment |
||||
Comment 1 by krajshree@chromium.org
, Apr 8 2018