Re: CSP: non-TLS scheme restrictions must allow TLS-enabled schemes automatically

On 26/06/11 22:19, Brian Smith wrote:
> In the draft spec, there is the statement "If a scheme is not
> specified as part of the source expression, a user-agent must use the
> same scheme as the protected document." I think additionally, there
> should be a statement that says "A source that has a non-TLS scheme
> (e.g. 'http' instead of 'https') and that uses the default port for
> the scheme (e.g. 80 for http) implies an additional source with the
> TLS variant of the scheme on that scheme's default port (e.g. 'https'
> on port 443)." Or, something a little more comprehensible than that.

Isn't there a risk here? HTTP vhosting exists, but TLS vhosting does not
(really) yet. So the owner of the website which is at might find that accessing
actually gives them the HTML content of, which is
hosted on the same machine, but controlled by someone else entirely.

So if the owner of found an XSS hole in, they could
inject links to "", which would be CSP-allowed, and
yet would return content under his control. (Albeit with certificate
mismatch errors.)

Is this risk basically just theoretical, or worth considering?


Received on Monday, 27 June 2011 08:14:49 UTC