Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
Tom Ritter 78fae782d0 Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-26 17:04:40 +00:00
.cargo Bug 1839459 - Elide empty closed sub-paths instead of emitting a start point. r=jrmuizel 2023-06-20 18:04:20 +00:00
.vscode
accessible Backed out changeset 8be4693aecbb (bug 1754905) for causing bustages in xpcAccessiblePivot.h. CLOSED TREE 2023-06-24 03:22:31 +03:00
browser Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio 2023-06-26 17:04:40 +00:00
build Bug 1833126 - doc: windows build - fix the path r=andi DONTBUILD 2023-06-23 08:45:34 +00:00
caps Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio 2023-06-26 17:04:40 +00:00
chrome
config Backed out 2 changesets (bug 1821228) for causing xpc failures in netwerk/test/unit/test_http_sfv.js CLOSED TREE 2023-06-23 16:20:02 +03:00
devtools Bug 1839192 - [devtools] Avoid instantiating new frame objects when its location isn't mapped. r=devtools-reviewers,bomsy 2023-06-26 16:47:07 +00:00
docs Backed out 2 changesets (bug 1821228) for causing xpc failures in netwerk/test/unit/test_http_sfv.js CLOSED TREE 2023-06-23 16:20:02 +03:00
docshell Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu 2023-06-26 14:22:14 +00:00
dom Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio 2023-06-26 17:04:40 +00:00
editor Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu 2023-06-26 14:22:14 +00:00
extensions Bug 1836792, part 1 - Add new site-pair-scoped permission 3rdPartyFrameStorage, r=anti-tracking-reviewers,timhuang 2023-06-23 12:14:18 +00:00
gfx Bug 1840327 - Explicitly use std:: namespace to refer to isnan(). r=gfx-reviewers,lsalzman 2023-06-26 15:21:20 +00:00
gradle/wrapper
hal
image Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu 2023-06-26 14:22:14 +00:00
intl Bug 1519167 - Part 30: Add methods to retrieve time zone transitions and utf-offsets from local time. r=spidermonkey-reviewers,allstarschh 2023-06-21 20:27:42 +00:00
ipc Backed out changeset 38a62f7736e9 (bug 1839834) for causing sandboxing related Gtest failures CLOSED TREE 2023-06-26 20:04:59 +03:00
js Bug 1840346 - Part 3: Update test262 exclusions. r=spidermonkey-reviewers,dminor 2023-06-26 14:59:45 +00:00
layout Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu 2023-06-26 14:22:14 +00:00
media Bug 1837570 - Use canonical-initiated connections for webrtc mirrors. r=bwc 2023-06-22 15:00:24 +00:00
memory Backed out 2 changesets (bug 1829128) for causing failures at TestPrintf. 2023-06-14 18:12:10 +03:00
mfbt Bug 1766058 - Avoid mixing log output. r=glandium 2023-06-19 20:44:29 +00:00
mobile Bug 1836363 - Add Changelog entry for PromptInstanceDelegate.onSelectIdentityCredentialAccount r=geckoview-reviewers,amejiamarmol 2023-06-26 13:27:05 +00:00
modules Bug 1731504 - Activate dom.events.phases.correctOrderOnTarget in Nightly. r=smaug 2023-06-26 16:43:11 +00:00
mozglue Bug 1839762 - Cast scoped enums to their underlying type when printing them. r=media-playback-reviewers,necko-reviewers,application-update-reviewers,geckoview-reviewers,handyman,emilio,valentin,bytesized,owlish,karlt 2023-06-24 20:14:31 +00:00
netwerk Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio 2023-06-26 17:04:40 +00:00
nsprpub
other-licenses
parser Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu 2023-06-26 14:22:14 +00:00
python Bug 1838041 - Add moz-five-star reuseable component. r=shopping-reviewers,desktop-theme-reviewers,dao,fluent-reviewers,flod,robwu,mstriemer,kpatenio 2023-06-22 21:29:28 +00:00
remote Bug 1522052 - remove nsIDOMChromeWindow. r=dom-core,webdriver-reviewers,devtools-reviewers,whimboo,mccr8 2023-06-23 14:21:05 +00:00
security Backed out changeset 38a62f7736e9 (bug 1839834) for causing sandboxing related Gtest failures CLOSED TREE 2023-06-26 20:04:59 +03:00
services No Bug, mozilla-central repo-update HSTS HPKP remote-settings - r=release-managers,dmeehan 2023-06-26 12:04:37 +00:00
servo Bug 1838740 - linear-gradient() and friends can parse a color interpolation method r=emilio 2023-06-26 13:46:38 +00:00
startupcache
storage Bug 1638256 - Some casts and fixes in mozStorage to make clang-tidy happy. r=asuth 2023-06-24 10:11:28 +00:00
supply-chain Bug 1840022 - Switch phf_macros to syn 2. r=emilio,supply-chain-reviewers,nika 2023-06-24 20:18:24 +00:00
taskcluster Bug 1839815 - fix attribution on esr harder. r=releng-reviewers,taskgraph-reviewers,bhearsum 2023-06-26 15:33:06 +00:00
testing Bug 1840232 - Fix SVGLength conversions r=emilio 2023-06-26 15:28:23 +00:00
third_party Bug 1840022 - Switch phf_macros to syn 2. r=emilio,supply-chain-reviewers,nika 2023-06-24 20:18:24 +00:00
toolkit Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio 2023-06-26 17:04:40 +00:00
tools Bug 1839368 - Fix debug mode in desktop browsertime tests. r=perftest-reviewers,kshampur 2023-06-26 12:59:54 +00:00
uriloader Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu 2023-06-26 14:22:14 +00:00
view Bug 1837960. Remove array of all nsViewManagers. r=emilio 2023-06-22 09:38:27 +00:00
widget Bug 1659790 - Remove unintuitive mouswheel scroll distance behavior. r=botond,masayuki 2023-06-26 12:47:47 +00:00
xpcom Bug 1839762 - Cast scoped enums to their underlying type when printing them. r=media-playback-reviewers,necko-reviewers,application-update-reviewers,geckoview-reviewers,handyman,emilio,valentin,bytesized,owlish,karlt 2023-06-24 20:14:31 +00:00
xpfe/appshell Bug 1838415 - Introduce RFPTarget::RoundWindowSize. r=tjr 2023-06-26 07:17:38 +00:00
.arcconfig
.babel-eslint.rc.js
.clang-format
.clang-format-ignore
.cron.yml Bug 1833417 - Add OSX Chromium-as-Release to cron. r=perftest-reviewers,taskgraph-reviewers,bhearsum,sparky 2023-06-19 13:20:01 +00:00
.eslintignore Bug 1838440 - Migrate kinto-http-client to ES module r=Standard8,robwu 2023-06-26 09:03:01 +00:00
.eslintrc-test-paths.js
.eslintrc.js
.git-blame-ignore-revs
.gitattributes
.gitignore Bug 1834558: chore(webgpu): sync .gitignore with .hgignore for WebGPU r=webgpu-reviewers,nical 2023-06-19 20:12:38 +00:00
.hg-annotate-ignore-revs
.hg-format-source
.hgignore
.hgtags
.lando.ini
.lldbinit
.mailmap
.prettierignore Bug 1838440 - Migrate kinto-http-client to ES module r=Standard8,robwu 2023-06-26 09:03:01 +00:00
.prettierrc.js
.stylelintignore
.stylelintrc.js
.taskcluster.yml
.trackerignore
.yamllint
.ycm_extra_conf.py
aclocal.m4
AUTHORS
build.gradle Bug 1837142 - Update to Glean v53.0.0 r=TravisLong,supply-chain-reviewers 2023-06-14 10:48:26 +00:00
Cargo.lock Bug 1840022 - Switch phf_macros to syn 2. r=emilio,supply-chain-reviewers,nika 2023-06-24 20:18:24 +00:00
Cargo.toml Bug 1840022 - Switch phf_macros to syn 2. r=emilio,supply-chain-reviewers,nika 2023-06-24 20:18:24 +00:00
client.mk
client.py
CLOBBER Bug 1839512 - remove unused event_wrapper.cc from libwebrtc build. r=dbaker,webrtc-reviewers - moz.build file updates 2023-06-21 14:11:21 +00:00
configure
configure.py Backed out changeset 9b440a541620 (bug 1838763) as requested by dev for causing Bug 1839369 2023-06-21 20:13:08 +03:00
GNUmakefile
gradle.properties
gradlew
gradlew.bat
LICENSE
mach
mach.cmd
mach.ps1
Makefile.in
mots.yaml Bug 1834831 - update imports of browser/modules JSMs r=webdriver-reviewers,perftest-reviewers,zeid,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sessionstore-reviewers,tabbrowser-reviewers,whimboo,mhowell,sgalich,robwu,sparky,Standard8,mconley,dao,sclements 2023-06-19 18:44:48 +00:00
moz.build
moz.configure
mozilla-config.h.in
old-configure.in Bug 1831935: optimize android gecko for O2 r=firefox-build-system-reviewers,glandium 2023-06-14 15:13:40 +00:00
package-lock.json
package.json
pyproject.toml
README.txt
settings.gradle
substitute-local-geckoview.gradle
test.mozbuild

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.