Bug 1545273 - User-Interaction required for trackers only for some urls, set in privacy.restrict3rdpartystorage.userInteractionRequiredForHosts, r=Ehsan

This patch fixes a bug about when the
privacy.restrict3rdpartystorage.userInteractionRequiredForHosts should be
considered.

Differential Revision: https://phabricator.services.mozilla.com/D28155

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrea Marchesini 2019-04-22 16:30:39 +00:00
Родитель 2a38c1eb3a
Коммит 266a28f53a
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -860,10 +860,10 @@ AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(
enum : uint32_t { enum : uint32_t {
blockReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER blockReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER
}; };
if ((aReason != eOpenerAfterUserInteraction || if (aReason != eOpenerAfterUserInteraction &&
nsContentUtils::IsURIInPrefList(trackingURI, nsContentUtils::IsURIInPrefList(trackingURI,
"privacy.restrict3rdpartystorage." "privacy.restrict3rdpartystorage."
"userInteractionRequiredForHosts")) && "userInteractionRequiredForHosts") &&
!HasUserInteraction(trackingPrincipal)) { !HasUserInteraction(trackingPrincipal)) {
LOG_SPEC(("Tracking principal (%s) hasn't been interacted with before, " LOG_SPEC(("Tracking principal (%s) hasn't been interacted with before, "
"refusing to add a first-party storage permission to access it", "refusing to add a first-party storage permission to access it",