Closed Bug 1818267 Opened 2 years ago Closed 2 years ago

The CBH Private Browsing site exceptions are not applied in the same session

Categories

(Firefox :: General, defect)

Desktop
All
defect

Tracking

()

RESOLVED DUPLICATE of bug 1815441
Tracking Status
firefox110 --- unaffected
firefox111 --- affected
firefox112 --- affected

People

(Reporter: ppop, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached image CBH_PBMexception.gif

[Affected versions]:

  • Firefox Beta 111.0b4 (Build ID 20230221190142)
  • Firefox Nightly 112.0a1 (Build ID 20230221212648)

[Affected platforms]:

  • Windows 10 x64
  • macOS 12.5
  • Ubuntu 22.04 x64

[Prerequisites]:
Have the following preferences set:

  • cookiebanners.service.mode set to 1
  • cookiebanners.service.mode.privateBrowsing set to 1
  • cookiebanners.ui.desktop.cfrVariant set to 1
  • cookiebanners.ui.desktop.enabled set to true
  • cookiebanners.service.detectOnly set to false

[Steps to reproduce]:

  1. Open the browser with the profile from prerequisites.
  2. Open a new Private Browsing Window and navigate to a website with cookie banners (e.g. cnn.com).
  3. Click the Shield icon from the awesomebar and click the "Cookie Banner Reduction" option.
  4. Click the "Turn Off" option and observe the page.

[Expected result]:

  • The page is refreshed and the page's cookie banner is displayed.

[Actual result]:

  • The page is refreshed and the page's cookie banner does not reappear.

[Notes]:

  • Attached a screen recording of the issue:

Noting this looks to be a dupe of https://bugzilla.mozilla.org/show_bug.cgi?id=1815441

:rtestard while the other bug outlines limitations of PBM, does this point to a need to consider what might be changed to improve the user experience as part of the revisions planned for release?

Flags: needinfo?(rtestard)

Does the inability to clear site data on PBM imply that the padlock icon feature to clear site data also does nothing? I'm unclear if this is a bug or something that just cannot be done by design, perhaps Paul knows?

Flags: needinfo?(rtestard) → needinfo?(pbz)

We've discussed this previously on Matrix, see https://matrix.to/#/!OmatsGKrkajXFNklDt:mozilla.org/$Su5ZvZKtMMTrlvmChc2AGTVHomnBpF9fkY1OWbKG0so?via=mozilla.org&via=matrix.org

Currently we can't clear data during a PBM session. This is a technical limitation with how PBM storages are implemented.
The shield panel code calls the SiteDataManager to remove data here: https://searchfox.org/mozilla-central/rev/75da1dd5d4b9b991f919a41594194eab93cdef62/browser/base/content/browser-siteProtections.js#1281
It seems to do this for both normal and private browsing. However, in both cases the normal browsing data is cleared. This is unexpected. We should not clear normal browsing data from an action in a PBM window. Perhaps we can skip the clear & reload step for PBM?

Even if we skip this clear and reload step there is still value in users being able to disable the cookie banner handling mechanism in PBM. For example maybe a site breaks because of our mechanism. The user won't be able to reshow the banner using the exception mechanism, but they may be able to unbreak the site.

Jared, do you think we could simply skip this step in PBM? https://searchfox.org/mozilla-central/rev/75da1dd5d4b9b991f919a41594194eab93cdef62/browser/base/content/browser-siteProtections.js#1281

Flags: needinfo?(pbz) → needinfo?(jhirsch)

Yeah, we should definitely be able to wrap that in an "if PBM" check. That might be better as its own bug, so I've filed bug 1818536 to capture that work.

I think we should otherwise be OK to close this bug as a dupe of 1815441, as Stuart noted in comment 1.

Flags: needinfo?(jhirsch)

I was not able to find an existing bug about adding the ability for ClearSiteData to work in a private browsing session, so I filed bug 1818783 to keep track of that.

Component: Privacy: Anti-Tracking → General
Product: Core → Firefox

Marking this as a dupe of 1815441 based on the comments above.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1815441
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: