Closed Bug 1544534 Opened 5 years ago Closed 5 years ago

Add carveout for NullPrincipal when asserting if explicit CSP and CSP on Principal are equal

Categories

(Core :: DOM: Security, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(2 files)

Using a clean profile do:

  • Navigate to data:application/json,["visit%20http://mozilla.org"]
  • It should open the JSON Viewer, with a mozilla.org link, click on it

Assertion in nsDocshell fires exhibiting that the explicit CSP and the CSP on the triggeringPrincipal are not equal.

Assignee: nobody → ckerschb
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [domsecurity-active]

Jonathan, Gijs, I found the problem why the assertion in nsDoShell is firing, but I am not sure if it's worth landing my patch given that we are so close to land Bug 965637 (which is ready for review today). Probably we might open a can of worms.

In detail:
We have not been serializing the CSP within the Principal for NullPrincipals. Please note that we have never been doing that and the problem disappears after Bug 965637, which would remove all the code we would add within this patch.

I think it might be the better solution to add a carveout to the assertion within nsDocshell and just do not assert for NullPrincipals so the update within Bug 1540069 can land.

What do you think?

Flags: needinfo?(jkt)
Flags: needinfo?(gijskruitbosch+bugs)

Assuming bug 965637 lands soon that wfm.

Flags: needinfo?(gijskruitbosch+bugs)
Summary: Missing callsite in frontend code does not explicitly pass a CSP → Add carveout for NullPrincipal when asserting if explicit CSP and CSP on Principal are equal
Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/autoland/rev/7a36097057bd
Add carveout for NullPrincipal when asserting if explicit CSP and CSP on Principal are equal. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1547957

Clearing ni. We agreed over slack.

Flags: needinfo?(jkt)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: