1
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:
Juraj Oravec 2024-04-21 11:43:47 +02:00
parent 80a1e4bd46
commit dbfac1c448
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -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