[whatwg] @srcdoc and default @sandbox

Maciej Stachowiak mjs at apple.com
Tue Aug 31 16:24:55 PDT 2010


On Aug 31, 2010, at 4:16 PM, Kornel Lesiński wrote:

> On 31.08.2010, at 23:39, Tab Atkins Jr. wrote:
> 
>>>>> At least as currently drafted, srcdoc is not a security feature. It's a
>>>>> convenience feature. It is also designed to work well in tandem with a
>>>>> particular security feature (sandbox). But by itself, it is not a security
>>>>> feature.
>>>> 
>>>> Data URLs already provide this.
>>> 
>>> What about existing UAs that implement data: URIs, but not sandbox?
>> 
>> What about them?
>> 
>> (Remember, the context of the "use data urls" suggestion was to solve
>> the minority use-case of wanting to fill an <iframe> without a network
>> request, without triggering sandboxing.)
> 
> Yes, it's OK for data without sandboxing. However, "inline data without sandboxing" does not cover all use cases of srcdoc. There's another use case of "inline data _with_ sandboxing and fallback for HTML4 UAs", for which data: URI currently cannot provide.
> 
> My point is that data: URIs provide only half of srcdoc functionality, and if srcdoc is supposed to be dropped in favor of data: URI, then the other use case needs to be taken into account as well.

You can use sandboxing with a data: URI by also specifying the "sandbox" attribute. As currently specified, srcdoc is almost entirely syntactic sugar.

Regards,
Maciej




More information about the whatwg mailing list