You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chrome no longer supports navigation to data URIs in the top level
window, for security reasons. So, for the preview as well as the spinner
that is displayed until gist export completes, we instead populate the
new window using good old `document.write`.
There is a minor concern here about security—in particular, we don’t
want malicious imported code to be able to access the Popcode
environment and attempt to e.g. hijack the user’s GitHub session. I
*think* the implementation herein prevents such an attack by removing
the `opener` property on the new window before populating its content,
in principle making it impossible for the opened window to access the
Popcode environment. This approach is discussed e.g. [in a Chromium
thread discussing `window.opener` security
risks](https://bugs.chromium.org/p/chromium/issues/detail?id=168988#c14)
and seems to be generally agreed to be sufficient. I could not find a
way to access `opener` from a window opened by Popcode.
0 commit comments