Commit graph

818 commits

Author SHA1 Message Date
Gijs Kruitbosch
dd394d57a2 Bug 1733558 - stop duplicating append redirect history entry logic everywhere, r=ckerschb,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127251
2021-10-04 13:24:15 +00:00
Shane Caraveo
efe27c108e Bug 1732388 support proxyBypass flag on http channels r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126550
2021-09-27 21:01:53 +00:00
Sean Feng
a1b9c83581 Bug 1731831 - Rename timedChannel to timedChannelInfo for ReplacementChannelConfig r=dragana,necko-reviewers
`timedChannel` is wrong because it implies it is a channel, however it
is in fact a `TimedChannelInfo`.

Differential Revision: https://phabricator.services.mozilla.com/D126254
2021-09-22 19:07:56 +00:00
Valentin Gosu
72c414923b Bug 1730494 - Add error codes for COOP and COEP errors r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125671
2021-09-16 08:31:04 +00:00
Nika Layzell
3211ad72e0 Bug 1723797 - Add a separate pref to control process isolation strategy when fission.autostart is enabled, r=farre,johannh,necko-reviewers,dragana
This new pref will be used on android to enable high-value-only process
isolation. An initial version of high-value-only process isolation is
also implemented in this bug, using the permission manager to track
whether a site is high-value due to having served a
`Cross-Origin-Opener-Policy` header.

Future high-value permissions due to things like logging into a site and
OAuth flows can be tracked in the same way, by adding the permission to
the permissions database.

In the future, it might be valuable to provide UI for visualizing what
sites are considered high-value at any point in time, but this works
fine for now.

Differential Revision: https://phabricator.services.mozilla.com/D123127
2021-09-08 17:45:31 +00:00
Kershaw Chang
ad767f9fe2 Bug 1721303 - Avoid exposing Alt-Used to service workers, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D122608
2021-08-17 14:48:04 +00:00
Kershaw Chang
32f8d51ddb Bug 1721781 - Make HTTP3 work when we use DIRECT proxy connection, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D120805
2021-08-09 12:25:54 +00:00
Tim Huang
4cca7fc573 Bug 1720869 - Part 1: Add a telemetry probe for referrer policy. r=ckerschb,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D121344
2021-08-02 19:24:54 +00:00
Gijs Kruitbosch
99251553e0 Bug 1717314 - do not force a dialog for https-redirect-to-external-protocol links from external sources, r=nika,pbz,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120879
2021-08-02 12:14:23 +00:00
Sandor Molnar
9a31129771 Backed out changeset bb055da29523 (bug 1717314) for causing bc failures in browser_protocol_ask_dialog_external. CLOSED TREE 2021-07-31 01:14:15 +03:00
Gijs Kruitbosch
e83ab3f744 Bug 1717314 - do not force a dialog for https-redirect-to-external-protocol links from external sources, r=nika,pbz,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120879
2021-07-30 21:24:33 +00:00
Nika Layzell
e620d25a35 Bug 1715167 - Part 6: Use the unsandboxed result principal as precursor for sandbox principals, r=ckerschb,ngogge
This change stores a generated nsID directly on the LoadInfo, rather
than the full SandboxedLoadingPrincipal. This allows for the sandboxed
principal to be constructed from GetChannelResultPrincipal using the
unsandboxed result principal as a precursor, rather than the loading
principal.

The nsID is reset by HttpChannelBase whenever a non-internal redirect
occurs to reduce the chance of multiple null result principals during a
redirect with the same nsID, but different precursors.

Depends on D119692

Differential Revision: https://phabricator.services.mozilla.com/D119693
2021-07-15 21:09:15 +00:00
Nika Layzell
dd4aed4589 Bug 1715167 - Part 4: Set precursor for redirect principal to inherit, r=ckerschb,necko-reviewers,ngogge,kershaw
When a navigation redirects, the principalToInherit is reset back to a null
principal for security reasons. This helps prevent a redirect from loading
attacker controlled content with the wrong principal. This patch gives this new
principalToInherit a precursor origin based on the resource which is being
redirected.

One time when this may come up is when an extension redirects a http: request
to a `data:` URI through the request API. Before this change, the load would
complete with a precursorless null principal, but after this change the
precursor refers to the redirected-from URL.

Depends on D119690

Differential Revision: https://phabricator.services.mozilla.com/D119691
2021-07-15 21:09:14 +00:00
Eden Chuang
4ce2d06b79 Bug 1714299 - Correct the opaque response judgment for opaque response blocking. r=necko-reviewers,annevk,dragana
An opaque response should be not only cross-origin but also be request with no_cors request mode.

To filter out the request with mode Same_origin, navigate, and cors. This patch reuses the algorithm in InternalRequest/FetchDriver to decide whether a response is an opaque response.

https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/InternalRequest.cpp#331
https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/FetchDriver.cpp#1153,1157

Differential Revision: https://phabricator.services.mozilla.com/D117086
2021-07-02 23:11:55 +00:00
Matt Woodrow
f0372c521b Bug 1717163 - Remove stream converter service usage for decompressing HTTP responses. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D118421
2021-06-22 21:19:43 +00:00
Christoph Kerschbaumer
fdcd24393c Bug 1715253: Break endless upgrade downgrade loops within https-first r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D118204
2021-06-22 14:56:44 +00:00
Csoregi Natalia
55047317f1 Backed out changeset 5e9693e4d6b7 (bug 1714299) for causing high frequency failures on browser_opaque_response_blocking_telemetry.js. CLOSED TREE 2021-06-22 18:15:31 +03:00
Eden Chuang
ef08c8d49b Bug 1714299 - Correct the opaque response judgment for opaque response blocking. r=necko-reviewers,annevk,dragana
An opaque response should be not only cross-origin but also be request with no_cors request mode.

To filter out the request with mode Same_origin, navigate, and cors. This patch reuses the algorithm in InternalRequest/FetchDriver to decide whether a response is an opaque response.

https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/InternalRequest.cpp#331
https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/FetchDriver.cpp#1153,1157

Differential Revision: https://phabricator.services.mozilla.com/D117086
2021-06-22 13:11:08 +00:00
Kershaw Chang
d8811704f9 Bug 1714506 - Force a transaction to wait for HTTPS RR, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117234
2021-06-17 14:17:48 +00:00
Valentin Gosu
8e040a6163 Bug 1710045 - Static analysis auto fixes r=necko-reviewers,kershaw
Depends on D114718

Differential Revision: https://phabricator.services.mozilla.com/D115987
2021-06-01 07:24:02 +00:00
Valentin Gosu
3b09f173e0 Bug 1710045 - Use DataMutex in nsHttp::sAtomTable r=necko-reviewers,dragana
- Make nsHttp::ResolveAtom lazily initialize the static atom table if empty
- Use a DataMutex to ensure locked access to the atom table
- Use nsCString in nsHttpAtom so strings can be shared/reference counted
- Add atomic sTableDestroyed so we don't reinit the atom table during shutdown

Depends on D114717

Differential Revision: https://phabricator.services.mozilla.com/D114718
2021-06-01 07:24:02 +00:00
Sebastian Hengst
544a953b13 Backed out 3 changesets (bug 1710045) for failing GTest TestHttpResponseHead.atoms on Windows. CLOSED TREE
Backed out changeset b4f466ca314e (bug 1710045)
Backed out changeset 66364f605471 (bug 1710045)
Backed out changeset 84c30435445b (bug 1710045)
2021-05-27 14:41:22 +02:00
Valentin Gosu
2fdf31f593 Bug 1710045 - Static analysis auto fixes r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115987
2021-05-27 09:12:36 +00:00
Valentin Gosu
6cdbc0a967 Bug 1710045 - Use DataMutex in nsHttp::sAtomTable r=necko-reviewers,dragana
- Make nsHttp::ResolveAtom lazily initialize the static atom table if empty
- Use a DataMutex to ensure locked access to the atom table
- Use nsCString in nsHttpAtom so strings can be shared/reference counted
- Add atomic sTableDestroyed so we don't reinit the atom table during shutdown

Depends on D114717

Differential Revision: https://phabricator.services.mozilla.com/D114718
2021-05-27 09:12:35 +00:00
Valentin Gosu
89f95f4942 Bug 1694662 - Remove nsICachingChannel.LOAD_CHECK_OFFLINE_CACHE flag r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106439
2021-04-30 07:20:17 +00:00
Valentin Gosu
87d676a1e4 Bug 1694662 - Remove appcache logic from http channels r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106430
2021-04-30 07:20:14 +00:00
Hubert Boma Manilla
eec8ef34ae Bug 1703786 - Use nsILoadInfo.sandboxFlags instead r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112154
2021-04-15 11:14:23 +00:00
Valentin Gosu
8781ae5e06 Bug 1689730 - Restrict Server-Timing to secure origins r=necko-reviewers,dragana
Server-Timing was only being parsed with HTTPS. But this is overly
restrictive to developers, so it's better to restrict it to
secure origins which includes `http://localhost/`

Differential Revision: https://phabricator.services.mozilla.com/D111795
2021-04-13 11:51:53 +00:00
Csoregi Natalia
c3936cc003 Backed out changeset ba593c7436f6 (bug 1689730) for failures on test_http_server_timing.js. CLOSED TREE 2021-04-13 13:55:44 +03:00
Valentin Gosu
967dfb7ad7 Bug 1689730 - Restrict Server-Timing to secure origins r=necko-reviewers,dragana
Server-Timing was only being parsed with HTTPS. But this is overly
restrictive to developers, so it's better to restrict it to
secure origins which includes `http://localhost/`

Differential Revision: https://phabricator.services.mozilla.com/D111795
2021-04-13 10:23:55 +00:00
Tom Tung
a48aba68bc Bug 1703464 - Bypass the CORP check when the loading principal is a system principal; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111056
2021-04-09 06:09:56 +00:00
Kershaw Chang
19602fcd6c Bug 1698661 - Use the id of top browsing context to dispatch transactions, r=necko-reviewers,kmag,dragana
Differential Revision: https://phabricator.services.mozilla.com/D110219
2021-04-07 07:59:18 +00:00
Tom Tung
8bb34122c1 Bug 1695987 - Collect the size of response to be parsed on ORB; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106960
2021-03-30 00:52:33 +00:00
Tom Tung
4316bedcd3 Bug 1683131 - Add telemetry probes to record time and result for checking a opaque response is allowed or not; r=necko-reviewers,annevk,dragana
Depends on D107207

Differential Revision: https://phabricator.services.mozilla.com/D103028
2021-03-30 00:52:32 +00:00
Tom Tung
57e6375fc2 Bug 1696111 - Use sniffers in the requested category; r=necko-reviewers,valentin
After applying D102448,
uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml starts to fail.
The reason is that it adds image sniffer into net-content-sniffers which is not
expected.

Such that, this patch
- adds two other sniffers category:
  - orb-content-sniffers
    - The sniffers that are needed in ORB.
  - net-and-orb-content-sniffers
    - The sniffers that are in either orb-content-sniffers or net-content-sniffers.
- changes the way to ensure we only use the sniffers in the
requested category.

Differential Revision: https://phabricator.services.mozilla.com/D107207
2021-03-30 00:52:32 +00:00
Tom Tung
bc25e0f18c Bug 1696111 - Sniff and check the initial media request and allow its subsequent requests; r=necko-reviewers,dragana
This implements the changes in https://github.com/annevk/orb/pull/16/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

Differential Revision: https://phabricator.services.mozilla.com/D106891
2021-03-30 00:52:31 +00:00
Tom Tung
053afd2976 Bug 1696111 - ORB core Implementation; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102448
2021-03-30 00:52:30 +00:00
Butkovits Atila
ad9b1ed9d7 Backed out 12 changesets (bug 1683131, bug 1696111, bug 1695987) for causing crashes(Bug 1701151). a=backout
Backed out changeset 8ffef57e27d2 (bug 1683131)
Backed out changeset c02d5dc72abb (bug 1695987)
Backed out changeset 276f016ddc67 (bug 1683131)
Backed out changeset 2c7a45e20b50 (bug 1683131)
Backed out changeset 11fdb503d537 (bug 1696111)
Backed out changeset 2946eff1e9c8 (bug 1696111)
Backed out changeset e4d01b88e517 (bug 1696111)
Backed out changeset fab7f4cd445d (bug 1696111)
Backed out changeset d60c38f8939a (bug 1696111)
Backed out changeset 3fdc8089a46f (bug 1696111)
Backed out changeset 51a16dfabc98 (bug 1696111)
Backed out changeset 642bdd52fd57 (bug 1696111)
2021-03-26 11:30:28 +02:00
Tom Tung
f8b719c714 Bug 1695987 - Collect the size of response to be parsed on ORB; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106960
2021-03-25 12:09:42 +00:00
Tom Tung
f89e57fe8c Bug 1683131 - Add telemetry probes to record time and result for checking a opaque response is allowed or not; r=necko-reviewers,annevk,dragana
Differential Revision: https://phabricator.services.mozilla.com/D103028
2021-03-25 12:09:41 +00:00
Tom Tung
02e26e0a82 Bug 1696111 - Use sniffers in the requested category; r=necko-reviewers,valentin
After applying D102448,
uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml starts to fail.
The reason is that it adds image sniffer into net-content-sniffers which is not
expected.

Such that, this patch
- adds two other sniffers category:
  - orb-content-sniffers
    - The sniffers that are needed in ORB.
  - net-and-orb-content-sniffers
    - The sniffers that are in either orb-content-sniffers or net-content-sniffers.
- changes the way to ensure we only use the sniffers in the
requested category.

Differential Revision: https://phabricator.services.mozilla.com/D107207
2021-03-25 12:09:41 +00:00
Tom Tung
04151cd9e2 Bug 1696111 - Sniff and check the initial media request and allow its subsequent requests; r=necko-reviewers,dragana
This implements the changes in https://github.com/annevk/orb/pull/16/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

Differential Revision: https://phabricator.services.mozilla.com/D106891
2021-03-25 12:09:40 +00:00
Tom Tung
1ff4caafd7 Bug 1696111 - ORB core Implementation; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102448
2021-03-25 12:09:39 +00:00
Kershaw Chang
ba8d32bcb3 Bug 1697480 - P1: Collect the time between asyncOpen and requestStart when HTTPS RR is used r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D107983
2021-03-18 15:26:36 +00:00
Simon Giesecke
b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Christoph Kerschbaumer
39ef03a187 Bug 1691888: Break endless upgrade downgrade loops when using https-only r=necko-reviewers,valentin,JulianWels
Differential Revision: https://phabricator.services.mozilla.com/D106475
2021-03-11 18:02:27 +00:00
Sebastian Streich
239f9451dc Bug 1685570 Backed out changeset 92d71744323a r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D107670
2021-03-10 15:15:24 +00:00
Bogdan Tara
69d8f06dc7 Backed out changeset 37aae4f2c6cf (bug 1691888) for test_break_endless_upgrade_downgrade_loop.html failures CLOSED TREE 2021-03-10 10:28:49 +02:00
Christoph Kerschbaumer
37c822edfd Bug 1691888: Break endless upgrade downgrade loops when using https-only r=necko-reviewers,valentin,JulianWels
Differential Revision: https://phabricator.services.mozilla.com/D106475
2021-03-10 07:30:25 +00:00
Valentin Gosu
0c7fa78a68 Bug 1681683 - Exclude OCSP channels from using TRR in mode3 r=necko-reviewers,kershaw
Otherwise the OCSP channel that tries to check the certificate for the DoH
server will also try to use TRR leading to DNS failures.

Differential Revision: https://phabricator.services.mozilla.com/D106884
2021-03-02 10:41:55 +00:00