mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Cookiejar: Properly process default permission
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
80a1e4bd46
commit
dbfac1c448
|
@ -150,6 +150,9 @@ void CookieJar::slotCookieRemoved(const QNetworkCookie &cookie)
|
|||
bool CookieJar::cookieFilter(const QWebEngineCookieStore::FilterRequest &request) const
|
||||
{
|
||||
auto result = mApp->siteSettingsManager()->getPermission(SiteSettingsManager::poAllowCookies, request.origin);
|
||||
if (result == SiteSettingsManager::Default) {
|
||||
result = mApp->siteSettingsManager()->getDefaultPermission(SiteSettingsManager::poAllowCookies);
|
||||
}
|
||||
|
||||
if (!m_allowCookies && (result != SiteSettingsManager::Allow)) {
|
||||
#ifdef COOKIE_DEBUG
|
||||
|
@ -180,6 +183,9 @@ bool CookieJar::rejectCookie(const QString &domain, const QNetworkCookie &cookie
|
|||
Q_UNUSED(domain)
|
||||
|
||||
auto result = mApp->siteSettingsManager()->getPermission(SiteSettingsManager::poAllowCookies, cookieDomain);
|
||||
if (result == SiteSettingsManager::Default) {
|
||||
result = mApp->siteSettingsManager()->getDefaultPermission(SiteSettingsManager::poAllowCookies);
|
||||
}
|
||||
|
||||
if (!m_allowCookies && (result != SiteSettingsManager::Allow)) {
|
||||
#ifdef COOKIE_DEBUG
|
||||
|
|
Loading…
Reference in New Issue
Block a user