NullPrincipals need to know whether they were spun off of a Secure Context
Categories
(Core :: DOM: Security, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox94 | --- | fixed |
People
(Reporter: freddy, Assigned: n.goeggi)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [domsecurity-backlog1])
Attachments
(1 file, 1 obsolete file)
Currently, the mixed content blocker is looking at NullPrincipals on their own, to decide whether blocking makes sense. NullPrincipals do not use an HTTPS URL-scheme and are therefore excluded from MCB checks.
We should to avoid finding a handle to the owning document of the NullPrincipal because that may pass process boundaries (and violate Site Isolation / Project Fission).
Instead, I am proposing to add that flag as a boolean flag to the NullPrincipal and change the Secure Context flag for the NullPrincipal (which currently is hardcoded false).
Comment 1•5 years ago
|
||
Yeah, I would like to get that fixed rather sooner than later actually - also because it would allow us to run more wpt tests in the tree.
| Reporter | ||
Comment 2•5 years ago
|
||
Fixing this involves:
- adding a boolean member to the NullPrincipal class to say whether we are in a secure context.
- adjust
GetIsOriginPotentiallyTrustworthyto use that flag
Setting that flag is a bit tricky:
NullPrincipals are created using one of many NullPrincipal::Create... functions, which are then routed through the main Create() function, which all call the object constructor eventually.
We already lose most context inside of the various Create.. functions, so we need to modify all of them to take a value for the flag based on the current document that creates the NullPrincipal.
I'm merely hoping that we can get the info for that boolean flag in all callsites though.
| Reporter | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Backed out for causing failures on test_bug1660452_https.html
-
backout: https://hg.mozilla.org/integration/autoland/rev/03d2c45cdd6bc00e26bc726b74d90237a629a5f4
-
failure log: https://treeherder.mozilla.org/logviewer?job_id=346041612&repo=autoland&lineNumber=5349
[task 2021-07-22T16:08:22.385Z] 16:08:22 INFO - TEST-PASS | dom/security/test/general/test_bug1660452_https.html | data uri window should be a secure context
[task 2021-07-22T16:08:22.385Z] 16:08:22 INFO - Buffered messages finished
[task 2021-07-22T16:08:22.385Z] 16:08:22 INFO - TEST-UNEXPECTED-FAIL | dom/security/test/general/test_bug1660452_https.html | Test timed out. -
[task 2021-07-22T16:08:23.265Z] 16:08:23 INFO - GECKO(4680) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2021-07-22T16:08:23.268Z] 16:08:23 INFO - GECKO(4680) | MEMORY STAT | vsize 2524MB | residentFast 127MB | heapAllocated 5MB
[task 2021-07-22T16:08:23.275Z] 16:08:23 INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-22T16:08:23.276Z] 16:08:23 INFO - TEST-UNEXPECTED-FAIL | dom/security/test/general/test_bug1660452_https.html | data uri frames should be a secure context
[task 2021-07-22T16:08:23.277Z] 16:08:23 INFO - SimpleTest.ok@https://example.org/tests/SimpleTest/SimpleTest.js:417:16
[task 2021-07-22T16:08:23.278Z] 16:08:23 INFO - @https://example.org/tests/dom/security/test/general/test_bug1660452_https.html?currentTestURL=dom%2Fsecurity%2Ftest%2Fgeneral%2Ftest_bug1660452_https.html&closeWhenDone=1&showTestReport=true&expected=pass:21:7
[task 2021-07-22T16:08:23.324Z] 16:08:23 INFO - TEST-OK | dom/security/test/general/test_bug1660452_https.html | took 301088ms
Updated•4 years ago
|
Comment 8•4 years ago
|
||
Backed out for causing web-tests failures on basic-popup-and-iframe-tests.https.html
Comment 10•4 years ago
|
||
| bugherder | ||
Description
•