зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1063730
- Require HTTPS for Screen/window sharing. r=mt,sstamm
This commit is contained in:
Родитель
fa8a767c0c
Коммит
36800a3f4b
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче