-
Notifications
You must be signed in to change notification settings - Fork 23
Description
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.
- Safari refuses to load blob URLs (iframe and worker) due to mixed content checks.
- Chrome loads both blob URL, the worker is not secure context.
- 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.