File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,17 @@ <h2>Parsing a style sheet</h2>
319
319
< pre class ="code "> < code class ="language-java "> sheet.getCssRules().clear();
320
320
</ code > </ pre >
321
321
</ div >
322
+ < div class ="tema " id ="securitymodel ">
323
+ < h2 > Security model</ h2 >
324
+ < p > Linked style sheets accessed through DOM are automatically fetched, but if your < code > LINK</ code > element or < code > @import</ code >
325
+ rule point to a < code > file:</ code > or < code > jar:</ code > URL, the style sheet won't be retrieved unless you set the < code > documentURI</ code >
326
+ of your document to one of those URIs.</ p >
327
+ < p > A similar reasoning applies to the contents of the < code > href</ code > attribute in the < code > BASE</ code > element. If you load a
328
+ document that contains a < code > <base href="file:///some/path"></ code > , that won't take effect until you call < code > setDocumentURI()</ code >
329
+ to set a URI with a < code > file:</ code > or < code > jar:</ code > scheme. This prevents denial of service attacks that could cause thread starvation
330
+ (for example by linking to < code > file:///dev/zero</ code > ) or deplete the pool of entropy in your server (< code > file:///dev/random</ code > ),
331
+ as well as < code > jar:</ code > decompression bombs.</ p >
332
+ </ div >
322
333
< div class ="tema " id ="legacycompat ">
323
334
< h2 > Compatibility with legacy browsers</ h2 >
324
335
< p > Today's style sheets often contain non-conformant styles that target specific versions of old web browsers, like Internet Explorer.
You can’t perform that action at this time.
0 commit comments