Skip to content

Spec is not clear about blobs created in sandboxed iframes #41

@youennf

Description

@youennf

A sandboxed srcrdoc iframe will have its origin as "null" so its origin will not be trustworthy but the iframe will be considered as secure context according https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy.

If that iframe creates a blob, the blob URL will be something like "blob://null/UUID".
Applying https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy to "blob://null/UUID", the URL should be considered as "Not Trustworthy". Trying to load that URL as iframe or worker should for instance trigger mixed content checks.

https://jsfiddle.net/fjvteqo5/ shows a difference of behaviour.

  1. Safari refuses to load blob URLs (iframe and worker) due to mixed content checks.
  2. Chrome loads both blob URL, the worker is not secure context.
  3. Firefox loads both blob URLs, the worker is secure context.

I am wondering what is behind the difference of behaviour between Safari and others.
Is it because blob://null/UUID in Safari is considered not trustworthy, while Chrome and Firefox are checking the context that created the blob?
I am also interested in hearing about Chrome/Firefox difference here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions