Skip to content

Restore Present view that doesn't allow phishing #1971

Open
@sflanker

Description

@sflanker

Seriously, I don't understand why the solution these issues:

isn't obvious!

Just look at what OpenProcessing does:

<iframe src="https://openprocessing.org/sketch/1165174/embed/?plusEmbedHash=NWEzMDU1MGZmMzAwNjhmMjhmODRlYmFhM2QxYmY4Mjc3MWE2NmI4NmRlNGYzMDg2YTEzYTdhYzgwYjgzMWI4NTIwY2IxNzkxNTFlNjg4OTBlOTYwMGUxMjJmYzQ4M2E4NmMyMjcxNjc3MTc1ODFkMWFkNWZiMzQxMjEzOTNlN2NYYzVHYVRWY3JOUGFXdlFYdm9HaG5OQ2JnejZyN2xNMkNHT1A2TEFuYTB0VEZWU1RpbkdVc3VUbklzZmNXMHZWZE03ODFZUy9iaHR5SjJ0OWJFdGdHdz09&plusEmbedTitle=true" width="600" height="600" frameborder="0"></iframe>
  • Use an iframe within an iframe.
  • The container iframe should display a banner that clearly identifies the site, owner of the sketch, and name of the sketch.
  • Make sure you request the URL for the actual sketch via a mechanism that the HTTP spec requires browsers to send a Origin header for
  • Have your server return a 404 on any requests for sketch content that do not have a valid Origin header for your domain.
  • Maybe add restrictions on the iframe that prevent it from going fullscreen.

Voila you can host user content in such a way that it will always be obvious to the person viewing the page that the content they are seeing is a p5js.org sketch, and not some other website (or page on your website), thus no legitimate phishing concerns.

Importantly, do not require cookies for this page to load (as is currently required for editor.p5js.org). The absolutely ridiculous banner that is mandated by the equally ridiculous EU parliament is horribly obnoxious and makes iframes that use editor.p5js.org URLs totally unusable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:PreviewFor features and bugs relating to the embedded preview sketch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions