Skip to content

Commit 349501c

Browse files
committed
Use 'Is URL trustworthy?' rather than whitelisting 'https' and 'wss'.
Based on the discussion in the public-webappsec thread starting at [1], our face-to-face at [2], and our recent call at [3], this patch aligns mixed content's checks with Secure Context's definition of potentially trustworthy URLs. Among other things, this means that `http://127.0.0.1/` will not be considered mixed content when loaded in an otherwise secure page. [1]: https://lists.w3.org/Archives/Public/public-webappsec/2016Apr/0044.html [2]: https://www.w3.org/2016/05/16-webappsec-minutes.html#item05 [3]: https://www.w3.org/2016/07/13-webappsec-minutes.html#item05 Closes #4. Obviates #5.
1 parent 2ed0d54 commit 349501c

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

index.src.html

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ <h1>Mixed Content</h1>
7878
text: request; url: concept-request
7979
text: url; for: request; url: concept-request-url
8080
text: response; url: concept-response
81+
text: url; for: response; url: concept-response-url
8182
text: network error; url: concept-network-error
8283
text: opaque filtered response; url: concept-filtered-response-opaque
8384
text: initiator; url: concept-request-initiator
@@ -264,10 +265,20 @@ <h2 id="terms">Key Concepts and Terminology</h2>
264265
</dfn>
265266
</dt>
266267
<dd>
267-
We know <i lang="la">a priori</i> that a request to a particular URL will
268-
be strongly authenticated if the URL's <a for="url">scheme</a> is
269-
"`https`" or "`wss`", as requests to those schemes will result in network
270-
errors for unauthenticated responses.
268+
We know <i lang="la">a priori</i> that a request to a particular URL
269+
(|url|) will be delivered in a way that mitigates the risks of
270+
interception and modifications if either of the following statements is
271+
true:
272+
273+
1. The algorithm defined in [[secure-contexts#is-url-trustworthy]]
274+
returns "`Potentially Trustworthy`" when executed upon |url|
275+
[[!SECURE-CONTEXTS]].
276+
277+
2. |url|'s <a for="url">scheme</a> is "`data`".
278+
279+
Note: We special case `data` URLs here, as we don't consider them
280+
particularly trustworthy, but we also don't wish to block them as
281+
mixed content, as they never hit the network.
271282
</dd>
272283

273284
<dt>
@@ -276,9 +287,16 @@ <h2 id="terms">Key Concepts and Terminology</h2>
276287
</dfn>
277288
</dt>
278289
<dd>
279-
We know <i lang="la">a posteriori</i> that a <a>response</a> is
280-
unauthenticated if its <a for="response">HTTPS state</a> is "`deprecated`"
281-
or "`none`".
290+
We know <i lang="la">a posteriori</i> that a <a>response</a>
291+
(|response|) is unauthenticated if both of the following statements
292+
are true:
293+
294+
1. |response|'s <a for="response">url</a> is <a><i lang="la">a
295+
priori</i> authenticated</a>.
296+
297+
2. If |response|'s <a for="response">url</a>'s <a for="url">scheme</a>
298+
is "`https`" or "`wss`", |response|'s <a for="response">HTTPS
299+
state</a> is "`modern`".
282300
</dd>
283301

284302
<dt><dfn export>embedding document</dfn></dt>
@@ -587,7 +605,7 @@ <h3 id="categorize-settings-object">
587605
<code>http://evil.com</code>. In this case, the insecure request to
588606
<code>evil.com</code> will be blocked, as <code>a.com</code> was loaded
589607
over a secure connection, even though the framed <code>data:</code> URL
590-
is not <a><i lang="la">a priori</i> authenticated</a>.
608+
would not block mixed content if loaded in a top-level context.
591609
</div>
592610
</div>
593611
</section>

0 commit comments

Comments
 (0)