Bug 1063730 - Require HTTPS for Screen/window sharing. r=mt,sstamm

This commit is contained in:
EKR 2014-09-10 15:01:44 -07:00
parent a677ceee79
commit 4922245545

View File

@ -135,6 +135,17 @@ HostInDomain(const nsCString &aHost, const nsCString &aPattern)
static bool
HostHasPermission(nsIURI &docURI)
{
nsresult rv;
bool isHttps;
rv = docURI.SchemeIs("https",&isHttps);
if (NS_WARN_IF(NS_FAILED(rv))) {
return false;
}
if (!isHttps) {
return false;
}
nsAdoptingCString hostName;
docURI.GetAsciiHost(hostName); //normalize UTF8 to ASCII equivalent
nsAdoptingCString domainWhiteList =
@ -145,7 +156,6 @@ HostHasPermission(nsIURI &docURI)
return false;
}
nsresult rv;
// Get UTF8 to ASCII domain name normalization service
nsCOMPtr<nsIIDNService> idnService
= do_GetService("@mozilla.org/network/idn-service;1", &rv);