Closed Bug 1319452 Opened 4 years ago Closed 4 years ago

Background page should be private in permanent private browsing mode

Categories

(WebExtensions :: General, defect)

50 Branch
defect
Not set
normal

Tracking

(firefox50 verified, firefox51 fixed, firefox52 verified, firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox50 --- verified
firefox51 --- fixed
firefox52 --- verified
firefox53 --- fixed

People

(Reporter: adolf_daniel, Assigned: kmag)

References

Details

(Whiteboard: [platform-rel-Symantec][platform-rel-Norton])

Attachments

(3 files)

Attached file test_ext.zip
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14

Steps to reproduce:

1. Enable "Private Browsing Mode" by default in Firefox 50 and restart the browser
2. Load the attached webExtension
3. Click on the extension button


Actual results:

It shows "hi" in the popup displayed. The error 'Error: Permission denied to access property "testData"' is shown in the console.

The background window object returned by the call chrome.extension.getBackgroundPage() is inaccessible. The chrome.runtime.getBackgroundPage(callback) also has the same issue.

This issue is not reproducible in Firefox 49.0.2. 
This issue is not reproducible in Firefox 50 if "private browsing mode" is disabled


Expected results:

It should say "hello" in the popup displayed. The properties of window object returned by chrome.extension.getBackgroudPage() should be accessible.
OS: Unspecified → All
Hardware: Unspecified → All
platform-rel: --- → ?
Whiteboard: [platform-rel-Symantec][platform-rel-Norton]
platform-rel: ? → ---
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1309620
Reopening, as there seem to be multiple issues here.

I can reproduce this in 50+. The reason it's not reproducible in 49 is that privateBrowsingId was not an origin attribute at that point, so cross-origin access was still allowed.
Status: RESOLVED → REOPENED
Component: WebExtensions: Untriaged → WebExtensions: General
Ever confirmed: true
Resolution: DUPLICATE → ---
Summary: chrome.extension.getBackgroundPage() is returning an inaccessible window object in private browsing mode → Background page should be private in permanent private browsing mode
Comment on attachment 8813381 [details]
Bug 1319452: Part 1 - Load background page in private browsing mode during permanent private browsing.

https://reviewboard.mozilla.org/r/94796/#review95064
Attachment #8813381 - Flags: review?(wmccloskey) → review+
Comment on attachment 8813382 [details]
Bug 1319452: Part 2 - Don't expose extension views that the caller cannot access.

https://reviewboard.mozilla.org/r/94798/#review95066
Attachment #8813382 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/926f21451281f50f9172366b534a684ab85f64eb
Bug 1319452: Part 1 - Load background page in private browsing mode during permanent private browsing. r=billm

https://hg.mozilla.org/integration/mozilla-inbound/rev/1846a78b62ff79f695c81c741cb1f15c9c2cda28
Bug 1319452: Part 2 - Don't expose extension views that the caller cannot access. r=billm
Comment on attachment 8813381 [details]
Bug 1319452: Part 1 - Load background page in private browsing mode during permanent private browsing.

Approval Request Comment
[Feature/regressing bug #]: Bug 1269361
[User impact if declined]: This causes add-ons which require communication with their background pages to break in permanent private browsing mode.
[Describe test coverage new/current, TreeHerder]: The related features are covered by extensive tests, and new tests have been added for this issue.
[Risks and why]: Low. This should only have an effect in cases where things are already behaving incorrectly. In those cases, any negative effects are almost certain to be less problematic than the issues this resolves.
[String/UUID change made/needed]: None
Attachment #8813381 - Flags: approval-mozilla-release?
Attachment #8813381 - Flags: approval-mozilla-beta?
Attachment #8813381 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/926f21451281
https://hg.mozilla.org/mozilla-central/rev/1846a78b62ff
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment on attachment 8813381 [details]
Bug 1319452: Part 1 - Load background page in private browsing mode during permanent private browsing.

This is a 50.0.1 dot release ride-along. Let's land this on m-r relbranch.
Attachment #8813381 - Flags: approval-mozilla-release?
Attachment #8813381 - Flags: approval-mozilla-release+
Attachment #8813381 - Flags: approval-mozilla-beta?
Attachment #8813381 - Flags: approval-mozilla-beta+
Attachment #8813381 - Flags: approval-mozilla-aurora?
Attachment #8813381 - Flags: approval-mozilla-aurora+
Reproduced the issue on FX 50.
Verified fixed FX 50.0.1, 52.0a2 (2016-11-24) Win 7.
Duplicate of this bug: 1319287
Depends on: 1321997
Assignee: nobody → kmaglione+bmo
I am still seeing this issue with my addon in 51.0.1.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.