Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4240)

Unified Diff: chrome/common/extensions/docs/server2/templates/articles/contentSecurityPolicy.html

Issue 10837255: Clarifying the CSP restrictions with regard to `connect-src` and `unsafe-eval`. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/templates/articles/contentSecurityPolicy.html
diff --git a/chrome/common/extensions/docs/server2/templates/articles/contentSecurityPolicy.html b/chrome/common/extensions/docs/server2/templates/articles/contentSecurityPolicy.html
index 2ed5b0c8c4ad266c7cb856e512c3589357f6fc0d..efd7c714507021eb798dfb74f8f1124ccfa0afa4 100644
--- a/chrome/common/extensions/docs/server2/templates/articles/contentSecurityPolicy.html
+++ b/chrome/common/extensions/docs/server2/templates/articles/contentSecurityPolicy.html
@@ -39,7 +39,9 @@
For full details regarding CSP's syntax, please take a look at
<a href="http://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#syntax">
the Content Security Policy specification
- </a>.
+ </a>, and the <a href="http://www.html5rocks.com/en/tutorials/security/content-security-policy/">
+ "An Introduction to Content Security Policy"
+ </a> article on HTML5Rocks.
</p>
<h2>Default Policy Restrictions</h2>
@@ -219,7 +221,10 @@ popup.html:
<p>
There is no mechanism for relaxing the restriction against executing inline
JavaScript. In particular, setting a script policy that includes
- <code>unsafe-inline</code> will have no effect. This is intentional.
+ <code>unsafe-inline</code> will have no effect. Likewise, there is no
+ mechanism for enabling <code>eval</code>-like constructs. Setting a script
+ policy that includes <code>unsafe-eval</code> will have no effect. This is
+ intentional.
</p>
<p>
@@ -243,6 +248,14 @@ popup.html:
<code>http://localhost</code>.
</p>
+<p class="note">
+ The restriction against resources loaded over HTTP applies only to those
+ resources which are directly executed. You're still free, for example, to
+ make XMLHTTPRequest connections to any origin you like; the default policy
+ doesn't restrict <code>connect-src</code> or any of the other CSP directives
+ in any way.
+</p>
+
<p>
A relaxed policy definition which allows script resources to be loaded from
<code>example.com</code> over HTTPS might look like:

Powered by Google App Engine
This is Rietveld 408576698