diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /dom/base/ThirdPartyUtil.cpp | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/ThirdPartyUtil.cpp')
-rw-r--r-- | dom/base/ThirdPartyUtil.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dom/base/ThirdPartyUtil.cpp b/dom/base/ThirdPartyUtil.cpp index 2c71ab3d94..0ced8aa7d8 100644 --- a/dom/base/ThirdPartyUtil.cpp +++ b/dom/base/ThirdPartyUtil.cpp @@ -200,9 +200,9 @@ ThirdPartyUtil::IsThirdPartyWindow(mozIDOMWindowProxy* aWindow, nsIURI* aURI, bool result; - // Ignore about:blank URIs here since they have no domain and attempting to - // compare against them will fail. - if (aURI && !NS_IsAboutBlank(aURI)) { + // Ignore about:blank and about:srcdoc URIs here since they have no domain + // and attempting to compare against them will fail. + if (aURI && !NS_IsAboutBlank(aURI) && !NS_IsAboutSrcdoc(aURI)) { nsCOMPtr<nsIPrincipal> prin; nsresult rv = GetPrincipalFromWindow(aWindow, getter_AddRefs(prin)); NS_ENSURE_SUCCESS(rv, rv); @@ -320,10 +320,10 @@ ThirdPartyUtil::IsThirdPartyChannel(nsIChannel* aChannel, nsIURI* aURI, } } - // Special consideration must be done for about:blank URIs because those - // inherit the principal from the parent context. For them, let's consider the - // principal URI. - if (NS_IsAboutBlank(channelURI)) { + // Special consideration must be done for about:blank and about:srcdoc URIs + // because those inherit the principal from the parent context. For them, + // let's consider the principal URI. + if (NS_IsAboutBlank(channelURI) || NS_IsAboutSrcdoc(channelURI)) { nsCOMPtr<nsIPrincipal> principalToInherit = loadInfo->FindPrincipalToInherit(aChannel); if (!principalToInherit) { |