Closed Bug 1363687 Opened 7 years ago Closed 7 years ago

Have gBrowser.loadOneTab() provide a valid triggeringPrincipal

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

      No description provided.
Assignee: nobody → ckerschb
Blocks: 1362329
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [domsecurity-active]
Gijs, as discussed we would like to pass a valid triggeringPrincpal within addTab. Over in Bug 1362993 we automatically rewrite tests to use BrowserTestUtils.addTab(...) which provides the triggeringPrincipal. Anyway, there are only a few occurrences within tests were we use gBrowser.loadOneTab(...) so I think it makes sense to manually update those tests to pass a valid triggeringPrincipal. Please note that "loadOneTab" [1] already passes the principal on to addTab internally. So I think this is all there is to do  in terms of updating tests.

https://dxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#1481
Attachment #8866323 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8866323 [details] [diff] [review]
bug_1363687_loadonetab_triggeringprincipal.patch

Review of attachment 8866323 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/test/general/browser_aboutSupport_newtab_security_state.js
@@ +15,5 @@
>      allowThirdPartyFixup: false,
>      relatedToCurrent: false,
>      skipAnimation: true,
> +    allowMixedContent: false,
> +    triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()

Nit: please add trailing comma here and elsewhere.
Attachment #8866323 - Flags: review?(gijskruitbosch+bugs) → review+
Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5f608b9c01ca
Have gBrowser.loadOneTab() provide a valid triggeringPrincipal. r=gijs
https://hg.mozilla.org/mozilla-central/rev/5f608b9c01ca
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: