summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/api/qwebenginecookiestore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/api/qwebenginecookiestore.cpp b/src/core/api/qwebenginecookiestore.cpp
index 9a07c7c7b..fa72265dc 100644
--- a/src/core/api/qwebenginecookiestore.cpp
+++ b/src/core/api/qwebenginecookiestore.cpp
@@ -196,7 +196,8 @@ bool QWebEngineCookieStorePrivate::canAccessCookies(const QUrl &firstPartyUrl, c
if (!filterCallback)
return true;
- bool thirdParty =
+ // Empty first-party URL indicates a first-party request (see net/base/static_cookie_policy.cc)
+ bool thirdParty = !firstPartyUrl.isEmpty() &&
!net::registry_controlled_domains::SameDomainOrHost(toGurl(url),
toGurl(firstPartyUrl),
net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);