From b046cf520290082771a2a4cf6fe0fd0999cfba53 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Tue, 28 Jan 2025 14:24:26 +0100 Subject: [PATCH] Hardening against incognito mode detection: fix max storage buckets with session only cookies (#1754) --- ...ening-against-incognito-mode-detection.patch | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build/patches/Hardening-against-incognito-mode-detection.patch b/build/patches/Hardening-against-incognito-mode-detection.patch index 6fcc3b41..572bb0fc 100644 --- a/build/patches/Hardening-against-incognito-mode-detection.patch +++ b/build/patches/Hardening-against-incognito-mode-detection.patch @@ -4,9 +4,22 @@ Subject: Hardening against incognito mode detection License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - storage/browser/quota/quota_settings.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + storage/browser/quota/quota_manager_impl.cc | 2 +- + storage/browser/quota/quota_settings.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) +diff --git a/storage/browser/quota/quota_manager_impl.cc b/storage/browser/quota/quota_manager_impl.cc +--- a/storage/browser/quota/quota_manager_impl.cc ++++ b/storage/browser/quota/quota_manager_impl.cc +@@ -1800,7 +1800,7 @@ int64_t QuotaManagerImpl::GetQuotaForStorageKey( + } + + if (type == StorageType::kTemporary && special_storage_policy_ && +- special_storage_policy_->IsStorageSessionOnly( ++ ((false)) && special_storage_policy_->IsStorageSessionOnly( + storage_key.origin().GetURL())) { + return settings.session_only_per_storage_key_quota; + } diff --git a/storage/browser/quota/quota_settings.cc b/storage/browser/quota/quota_settings.cc --- a/storage/browser/quota/quota_settings.cc +++ b/storage/browser/quota/quota_settings.cc