summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkcookiejar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qnetworkcookiejar.cpp')
-rw-r--r--src/network/access/qnetworkcookiejar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp
index 1ae49aeee9..412b8d859d 100644
--- a/src/network/access/qnetworkcookiejar.cpp
+++ b/src/network/access/qnetworkcookiejar.cpp
@@ -331,7 +331,8 @@ bool QNetworkCookieJar::deleteCookie(const QNetworkCookie &cookie)
bool QNetworkCookieJar::validateCookie(const QNetworkCookie &cookie, const QUrl &url) const
{
QString domain = cookie.domain();
- if (!(isParentDomain(domain, url.host()) || isParentDomain(url.host(), domain)))
+ const QString host = url.host();
+ if (!isParentDomain(domain, host) && !isParentDomain(host, domain))
return false; // not accepted
// the check for effective TLDs makes the "embedded dot" rule from RFC 2109 section 4.3.2