mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
CSP: Support IDNs in connect-src
This commit is contained in:
parent
7de286b67c
commit
ee67abc801
6 changed files with 135 additions and 2 deletions
|
|
@ -270,7 +270,7 @@ CSP_CreateHostSrcFromURI(nsIURI* aURI)
|
|||
{
|
||||
// Create the host first
|
||||
nsCString host;
|
||||
aURI->GetHost(host);
|
||||
aURI->GetAsciiHost(host);
|
||||
nsCSPHostSrc *hostsrc = new nsCSPHostSrc(NS_ConvertUTF8toUTF16(host));
|
||||
|
||||
// Add the scheme.
|
||||
|
|
@ -643,7 +643,7 @@ nsCSPHostSrc::permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected
|
|||
// Before we can check if the host matches, we have to
|
||||
// extract the host part from aUri.
|
||||
nsAutoCString uriHost;
|
||||
nsresult rv = aUri->GetHost(uriHost);
|
||||
nsresult rv = aUri->GetAsciiHost(uriHost);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
|
||||
nsString decodedUriHost;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue