Closed Bug 1289818 Opened 8 years ago Closed 8 years ago

Investigate TriggeringPrincipal for simple window.open()

Categories

(Core :: DOM: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

Similar to Bug 1289382, but only for simple window.open() cases.
Blocks: 1182569
Whiteboard: [domsecurity-active]
Assignee: nobody → ckerschb
Status: NEW → ASSIGNED
Jonas, it seems a simple window.open() works as expected. I think it makes sense to have that testcase landed before investigating the more complicated case of a targeted window.open() within Bug 1289382.
Attachment #8775220 - Flags: review?(jonas)
Comment on attachment 8775220 [details] [diff] [review]
bug_1289818_test_triggeringprincipal_simple_window_open.patch

Olli, Jonas is too busy to review those changes before he leaves, any chance you wanna review those tests?

It seems a simple window.open() works as expected, but we should land that testcase to make sure we are not regressing it once we make more changes to docshell and it's triggeringPrincipal.
Attachment #8775220 - Flags: review?(jonas) → review?(bugs)
Comment on attachment 8775220 [details] [diff] [review]
bug_1289818_test_triggeringprincipal_simple_window_open.patch

I don't understand why loadingPrincipal is null, when our documentation clearly says it should never be null
http://searchfox.org/mozilla-central/rev/3df383b8552c1f8059f5c21258388ddb5a2f33d0/netwerk/base/nsILoadInfo.idl#188-190
Attachment #8775220 - Flags: review?(bugs) → review-
ok, sicking explained in that other bug that we've quite radically changed the meaning of loadingPrincipal and it can now be null.
The documentation must be fixed.
Attachment #8775220 - Flags: review- → review+
(In reply to Olli Pettay [:smaug] from comment #4)
> ok, sicking explained in that other bug that we've quite radically changed
> the meaning of loadingPrincipal and it can now be null.
> The documentation must be fixed.

I filed bug 1291458 to update the documentation for LoadingPrincipal within nsILoadInfo.
Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ea46f773afb
Test TriggeringPrincipal for a simple window.open(). r=smaug
https://hg.mozilla.org/mozilla-central/rev/5ea46f773afb
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: