mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1063730
- Require HTTPS for Screen/window sharing. r=mt,sstamm
This commit is contained in:
parent
c73c34fc6f
commit
372953c8d4
@ -135,6 +135,17 @@ HostInDomain(const nsCString &aHost, const nsCString &aPattern)
|
|||||||
static bool
|
static bool
|
||||||
HostHasPermission(nsIURI &docURI)
|
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;
|
nsAdoptingCString hostName;
|
||||||
docURI.GetAsciiHost(hostName); //normalize UTF8 to ASCII equivalent
|
docURI.GetAsciiHost(hostName); //normalize UTF8 to ASCII equivalent
|
||||||
nsAdoptingCString domainWhiteList =
|
nsAdoptingCString domainWhiteList =
|
||||||
@ -145,7 +156,6 @@ HostHasPermission(nsIURI &docURI)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv;
|
|
||||||
// Get UTF8 to ASCII domain name normalization service
|
// Get UTF8 to ASCII domain name normalization service
|
||||||
nsCOMPtr<nsIIDNService> idnService
|
nsCOMPtr<nsIIDNService> idnService
|
||||||
= do_GetService("@mozilla.org/network/idn-service;1", &rv);
|
= do_GetService("@mozilla.org/network/idn-service;1", &rv);
|
||||||
|
Loading…
Reference in New Issue
Block a user