Open Bug 1490252 Opened 7 years ago Updated 3 years ago

Assert that referrer and triggeringPrincipal are identicial for docshell loads

Categories

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

enhancement

Tracking

()

People

(Reporter: ckerschb, Unassigned)

References

(Depends on 2 open bugs)

Details

(Whiteboard: [domsecurity-backlog1])

Attachments

(1 file)

Once we have a valid triggeringPrincipal on all docshell loads (Bug 1333030) we should make sure that the triggeringPrincipal and the referrer match. In fact, if there is a referrer, the triggeringPrincipal should be a CodeBasePrincipal and the URI of that CodeBasePrincipals should match the referrer URI. Let's have a look how far we are away from adding such an assertion: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e78c1303b879641575c03f4212aff627b7bc25e9
Priority: -- → P3
Whiteboard: [domsecurity-backlog1]
Why would this always be the case? What if new document loads are triggered by a webextension but with the referrer set to the currently-loaded doc, for instance?
Flags: needinfo?(ckerschb)
(In reply to :Gijs (he/him) from comment #1) > Why would this always be the case? What if new document loads are triggered > by a webextension but with the referrer set to the currently-loaded doc, for > instance? I agree that there will be exceptions to that rule, but hopefully we can filter them out for the purpose of the assertion. What I want to make sure is that there is no misalignment of referrer and triggeringPrincipal when they in fact should match, which I would imagine is the case for a vast majority of loads. Currently in the tree we even create the triggeringPrincpal from the referrer if no triggeringPrincipal is passed explicitly, but we hopefully should be able to remove that fallback (see Bug 1490257) soon.
Flags: needinfo?(ckerschb)
Assignee: nobody → jkt
It seems there are a few places this might fail when in the parent process, without that I think we are more likely to land this
Assignee: jkt → tnguyen
Status: NEW → ASSIGNED
Whiteboard: [domsecurity-backlog1] → [domsecurity-active]
Assignee: tnguyen → nobody
Status: ASSIGNED → NEW
Whiteboard: [domsecurity-active] → [domsecurity-backlog1]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: