Commit graph

925 commits

Author SHA1 Message Date
Tim Huang
80ba0dbd0c Bug 1808212 - Part 2: Implement the ETP level2 list pref for the private browsing mode. r=dimi
Depends on D165937

Differential Revision: https://phabricator.services.mozilla.com/D165938
2023-01-05 13:37:33 +00:00
Valentin Gosu
c56863a357 Bug 1596845 - Pass TRR skip reason to child channel r=necko-reviewers,kershaw
Moves the TRRSkipReasons to nsITRRSkipReason.idl so they are available to JS.

Depends on D164345

Differential Revision: https://phabricator.services.mozilla.com/D164348
2022-12-23 09:26:15 +00:00
Valentin Gosu
fe60b134d1 Bug 1596845 - Pass effectiveTRRMode to HTTP child channel r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164345
2022-12-23 09:26:15 +00:00
Marian-Vasile Laza
56b22ee0ba Backed out 9 changesets (bug 1596845) for causing xpcshell failures on test_trr_enterprise_policy.js. CLOSED TREE
Backed out changeset 231acfc052bb (bug 1596845)
Backed out changeset 7d02dad4d720 (bug 1596845)
Backed out changeset b0449eec2671 (bug 1596845)
Backed out changeset 5cd033c9ef7c (bug 1596845)
Backed out changeset 98d583f1d19e (bug 1596845)
Backed out changeset b78bc0049605 (bug 1596845)
Backed out changeset 88919aaff89b (bug 1596845)
Backed out changeset f4adb3e7b8e1 (bug 1596845)
Backed out changeset b171f7ac0b40 (bug 1596845)
2022-12-23 09:21:39 +02:00
Valentin Gosu
dae40829fc Bug 1596845 - Pass TRR skip reason to child channel r=necko-reviewers,kershaw
Moves the TRRSkipReasons to nsITRRSkipReason.idl so they are available to JS.

Depends on D164345

Differential Revision: https://phabricator.services.mozilla.com/D164348
2022-12-23 01:20:01 +00:00
Valentin Gosu
a1617e68bc Bug 1596845 - Pass effectiveTRRMode to HTTP child channel r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164345
2022-12-23 01:20:01 +00:00
Sandor Molnar
56d5efdcae Backed out 9 changesets (bug 1596845) for causing mochitest failures in browser/base/content/test/about/browser_aboutCertError_telemetry.js
Backed out changeset eb1e34c3041f (bug 1596845)
Backed out changeset af6d41439c60 (bug 1596845)
Backed out changeset f1447dd8df04 (bug 1596845)
Backed out changeset a383f2bbcaae (bug 1596845)
Backed out changeset 950c66dd6133 (bug 1596845)
Backed out changeset ab300239fd69 (bug 1596845)
Backed out changeset 8e1fe024b680 (bug 1596845)
Backed out changeset 80e5048d1f35 (bug 1596845)
Backed out changeset b14a4910d73b (bug 1596845)
2022-12-23 00:56:35 +02:00
Valentin Gosu
b1e4e1e730 Bug 1596845 - Pass TRR skip reason to child channel r=necko-reviewers,kershaw
Moves the TRRSkipReasons to nsITRRSkipReason.idl so they are available to JS.

Depends on D164345

Differential Revision: https://phabricator.services.mozilla.com/D164348
2022-12-22 21:16:06 +00:00
Valentin Gosu
2ca88c649b Bug 1596845 - Pass effectiveTRRMode to HTTP child channel r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164345
2022-12-22 21:16:05 +00:00
Norisz Fay
8cf029b070 Backed out 15 changesets (bug 1247687) as requested by dev CLOSED TREE
Backed out changeset 81d052cabf84 (bug 1247687)
Backed out changeset d698041e5174 (bug 1247687)
Backed out changeset 2adf67f910e8 (bug 1247687)
Backed out changeset 0bc871906e97 (bug 1247687)
Backed out changeset 1700d5b79273 (bug 1247687)
Backed out changeset 31888ffde37a (bug 1247687)
Backed out changeset 9153182c650d (bug 1247687)
Backed out changeset 45de9ffeec19 (bug 1247687)
Backed out changeset 59207e959b7c (bug 1247687)
Backed out changeset 49f18430c465 (bug 1247687)
Backed out changeset 0ae1fd421d4f (bug 1247687)
Backed out changeset 7770ec4717fd (bug 1247687)
Backed out changeset 68b476066248 (bug 1247687)
Backed out changeset c94a9dc60dff (bug 1247687)
Backed out changeset 0ab366c6eaaf (bug 1247687)
2022-12-21 10:48:15 +02:00
Yulia Startsev
dcbacd54c8 Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2022-12-20 20:56:15 +00:00
Csoregi Natalia
c382c6a7ca Backed out 16 changesets (bug 1247687) for frequent string bundle related crashes with PDF viewer (bug 1806064). a=backout
Backed out changeset 721f612fd09f (bug 1247687)
Backed out changeset c6c5750cf713 (bug 1247687)
Backed out changeset 5d05ab0c7cde (bug 1247687)
Backed out changeset 2429599729cb (bug 1247687)
Backed out changeset 55f13fb4ee3f (bug 1247687)
Backed out changeset 354711cf113a (bug 1247687)
Backed out changeset 40b8abaf1c0b (bug 1247687)
Backed out changeset 0c9650a1ac48 (bug 1247687)
Backed out changeset e7b103c79b1a (bug 1247687)
Backed out changeset 4dbd510fb042 (bug 1247687)
Backed out changeset 9276c7e1ddd9 (bug 1247687)
Backed out changeset 6ee318df6641 (bug 1247687)
Backed out changeset 6c129bd72b61 (bug 1247687)
Backed out changeset 4b0a4fcc6894 (bug 1247687)
Backed out changeset 34680059b9f0 (bug 1247687)
Backed out changeset 85b827971a48 (bug 1247687)
2022-12-17 11:27:32 +02:00
Yulia Startsev
4916e53611 Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2022-12-14 14:55:38 +00:00
Sean Feng
304592ae1b Bug 1802216 - Don't start nsCompressedAudioVideoImageDetector and nsUnknownDecoder in the same time r=farre,necko-reviewers,valentin
We should only need to start nsCompressedAudioVideoImageDetector when
nsUnknownDecoder is not going to be started. Generally, they are not
designed to be working together.

Differential Revision: https://phabricator.services.mozilla.com/D163063
2022-12-02 18:29:35 +00:00
mleclair
7b13f01ed4 Bug 1792187 - added proxy attribute to verify if a proxy is used r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D161011
2022-12-02 16:54:23 +00:00
Manuel Bucher
8b9959b96e Bug 1771867 - Early Hints Phase 2 - Part 3: Add mechanism to notify EarlyHintPreloader that HttpChannelParent is ready to complete the redirect r=necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161178
2022-12-02 16:15:54 +00:00
Manuel Bucher
2a9cb26225 Bug 1771867 - Early Hints Phase 2 - Part 2: Pass early hint preloads to preloader from IPC r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161173
2022-12-02 16:15:53 +00:00
Csoregi Natalia
5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher
dc7f77bdba Bug 1771867 - Early Hints Phase 2 - Part 3: Add mechanism to notify EarlyHintPreloader that HttpChannelParent is ready to complete the redirect r=necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161178
2022-12-02 09:45:24 +00:00
Manuel Bucher
808529a4e4 Bug 1771867 - Early Hints Phase 2 - Part 2: Pass early hint preloads to preloader from IPC r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161173
2022-12-02 09:45:24 +00:00
Andreas Farre
22ce77379d Bug 1791918 - Part 1: Ensure that ORB handles UNKNOWN_CONTENT_TYPE correctly. r=necko-reviewers,sefeng,valentin
With this patch we also try to align a bit more with the current in
development spec at: https://whatpr.org/fetch/1442.html#orb-algorithm

The tests:

* fetch/orb/tentative/known-mime-type.sub.any.js
* fetch/orb/tentative/unknown-mime-type.sub.any.js

specifically tests the case of UNKNOWN_CONTENT_TYPE, i.e. the case
where the `orb-algorithm` fails to extract a MIME type from the
response headers.

Differential Revision: https://phabricator.services.mozilla.com/D161142
2022-12-02 08:34:50 +00:00
Kershaw Chang
09884ffa96 Bug 1800990 - Don't taint redirected channel for HSTS upgrade, r=robwu,necko-reviewers,tschuster
Differential Revision: https://phabricator.services.mozilla.com/D163305
2022-12-01 13:36:14 +00:00
Sean Feng
bd249c4f8e Bug 1797947 - Make devtools generated fetch requests excluded from resource timing r=jdescottes,valentin,necko-reviewers
Devtools can generate fetch request on behalf of the content document,
reporting these requests in PerformanceObserver would cause confusion,
so we should ignore them.

Differential Revision: https://phabricator.services.mozilla.com/D162582
2022-11-22 14:24:19 +00:00
Sean Feng
7c5c4c1c32 Bug 1797983 - Make Sniffing with ORB decompresses contents before making a decision r=necko-reviewers,farre,valentin
Our current code uses PeekStream to get the data and pass them
over to the sniffer, however it doesn't count the case where the
contents are compressed, so the sniffer would fail to determine
the type of contents.

This patch we creates a child class of nsUnknowDecoder to utilize
its ability to hold off of calling the next OnStartRequest until
the contentType is determined, we also overrides DetermineContentType
method to make it focuses on decoding the compressed contents only.

Credit goes to farre since he pointed out this solution.

Differential Revision: https://phabricator.services.mozilla.com/D161167
2022-11-14 16:11:46 +00:00
Sean Feng
1568f73f70 Bug 1798178 - Allow ORB ignores save link downloads r=necko-reviewers,valentin
There's no point of blocking requests that users want to download,
and these requests are only being handled the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D160845
2022-11-01 21:39:15 +00:00
Sean Feng
66fd07b1d7 Bug 1785331 - Ensure ORB clears out the headers r=valentin,necko-reviewers
Depends on D157844

Differential Revision: https://phabricator.services.mozilla.com/D158856
2022-10-27 19:18:13 +00:00
Sean Feng
6181fdcbf8 Bug 1785331 - Allow partially implemented ORB to be used in Nightly r=emilio,smaug,necko-reviewers,valentin
This patch starts to actually blocking opaque responses
for most type of the resources that are defined in the spec.
There are still pieces missing such as blocking JSON responses,
and this is why it's called partially implemented.

This patch was originally written by farre, and I made some
modifications based on it.

Depends on D155128

Differential Revision: https://phabricator.services.mozilla.com/D155129
2022-10-27 19:18:11 +00:00
Denis Palmeiro
f03d088027 Bug 1797346: Set redirectEnd to current timestamp if responseEnd of last channel is not defined. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D160252
2022-10-26 17:22:19 +00:00
Sean Feng
3ed2666383 Bug 1792229 - Make Origin-Trial COEP:Credentialless works on process selection r=emilio,necko-reviewers,valentin
Currently, if users enabled COEP:Credentialless by Origin-Trial,
it won't put the document into an isolated process, this patch
fixes.

Though the caveat is this only works for enabling Origin-Trial
in the response header, setting it via <meta> still won't work.

Differential Revision: https://phabricator.services.mozilla.com/D158684
2022-10-17 15:20:51 +00:00
Andrew Creskey
e8a5f6e8d2 Bug 1789468 - Add telemetry probe to measure from AsyncOpen to the transaction being added to the HttpConnectionManager r=necko-reviewers,kershaw
Collect this timing because it's on the critical path and may be slow in some scenarios.

Differential Revision: https://phabricator.services.mozilla.com/D157204
2022-09-22 12:32:02 +00:00
Valentin Gosu
56e1364da9 Bug 1789128 - Always call LoadInfo::GetPerformanceStorage() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D156825
2022-09-20 15:27:44 +00:00
Dana Keeler
923d7b2029 Bug 1790451 - make nsIChannel.securityInfo concrete as nsITransportSecurityInfo r=kershaw,necko-reviewers,valentin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D157136
2022-09-20 03:58:49 +00:00
smayya
0f790e555a Bug 1629690 - Remove deprecated attribute nsIHttpChannel::allowPipelining. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D154076
2022-08-09 10:55:10 +00:00
Sean Feng
288cbe9f46 Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-27 20:33:19 +00:00
Marian-Vasile Laza
2ab97e789a Backed out 2 changesets (bug 1778492) for causing eslint failures.
Backed out changeset 6c3ac3569d31 (bug 1778492)
Backed out changeset 34227495753a (bug 1778492)
2022-07-26 17:43:53 +03:00
Sean Feng
38f70ee5fc Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-26 14:06:04 +00:00
Tom Ritter
c55fc9ce83 Bug 1737829: Add an RFP argument to UserAgent() and AddStandardRequestHeaders() r=necko-reviewers,kershaw
UserAgent() needs a parameter because it previously was
calling the non-fine-grained RFP check. It can't call the
fine-grained check, so it needs to be told what to do.

AddStandardRequestHeaders calls UserAgent() and needs to
know what to pass it.

Differential Revision: https://phabricator.services.mozilla.com/D144582
2022-07-15 20:39:23 +00:00
Tom Ritter
f11bc3e771 Bug 1737829: Add loadInfo to nsHttpChannel::Init() r=necko-reviewers,kershaw
Everywhere except one loadInfo is supplied to an HTTPChannel
right after it is Init()-ed.  Inside of Init we would like to
use the loadInfo so we'll put it in there.

Differential Revision: https://phabricator.services.mozilla.com/D144580
2022-07-15 20:39:22 +00:00
Dragana Damjanovic
0cb9ae544a Bug 1778272 - Revert the change to the LoadInfo release function. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151103
2022-07-06 08:10:51 +00:00
Tom Schuster
0d488d2e8e Bug 1776414 - Change nsIHttpChannelInternal corsMode to requestMode. r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D150243
2022-06-29 14:09:57 +00:00
Sean Feng
6acee53f6c Bug 1731778 - Implement COEP: credentialless r=smaug,necko-reviewers,kershaw
Spec: https://html.spec.whatwg.org/multipage/#coep:coep-credentialless

Credentialless is a new cross-origin embedder policy which allows us
to not enforcing CORP when loading cross-origin resources while
providing SharedArrayBuffer.

There are two main things involved here:
  1. Fetching cross-origin no-CORS resources omits credentials
     - This is done by applying `LOAD_ANONYMOUS` flag to the request
  2. Other requests sent with credentials require the server's explicit
  permission through the CORS protocol or the CORS header
     - This is done by expanding `ProcessCrossOriginResourcePolicyHeader`
     function to apply the necessary checks.

Differential Revision: https://phabricator.services.mozilla.com/D147802
2022-06-27 17:07:15 +00:00
Iulian Moraru
672f2cb672 Backed out 3 changesets (bug 1731778) for causing COEP related failures on embedding.tentative.https.window.html.
Backed out changeset c30f5751d54c (bug 1731778)
Backed out changeset 0eec19308453 (bug 1731778)
Backed out changeset 7c14fa8a4804 (bug 1731778)
2022-06-22 22:00:17 +03:00
Sean Feng
80b0c0f55b Bug 1731778 - Implement COEP: credentialless r=smaug,necko-reviewers,kershaw
Spec: https://html.spec.whatwg.org/multipage/#coep:coep-credentialless

Credentialless is a new cross-origin embedder policy which allows us
to not enforcing CORP when loading cross-origin resources while
providing SharedArrayBuffer.

There are two main things involved here:
  1. Fetching cross-origin no-CORS resources omits credentials
     - This is done by applying `LOAD_ANONYMOUS` flag to the request
  2. Other requests sent with credentials require the server's explicit
  permission through the CORS protocol or the CORS header
     - This is done by expanding `ProcessCrossOriginResourcePolicyHeader`
     function to apply the necessary checks.

Differential Revision: https://phabricator.services.mozilla.com/D147802
2022-06-22 13:13:39 +00:00
Narcis Beleuzu
9e3db37db1 Backed out 2 changesets (bug 1731778) for wpt failures on embedding.tentative.https.window.html . CLOSED TREE
Backed out changeset 2510b654e8f2 (bug 1731778)
Backed out changeset fea9b21d8efe (bug 1731778)
2022-06-21 19:13:32 +03:00
Sean Feng
413fe3115c Bug 1731778 - Implement COEP: credentialless r=smaug,necko-reviewers,kershaw
Spec: https://html.spec.whatwg.org/multipage/#coep:coep-credentialless

Credentialless is a new cross-origin embedder policy which allows us
to not enforcing CORP when loading cross-origin resources while
providing SharedArrayBuffer.

There are two main things involved here:
  1. Fetching cross-origin no-CORS resources omits credentials
     - This is done by applying `LOAD_ANONYMOUS` flag to the request
  2. Other requests sent with credentials require the server's explicit
  permission through the CORS protocol or the CORS header
     - This is done by expanding `ProcessCrossOriginResourcePolicyHeader`
     function to apply the necessary checks.

Differential Revision: https://phabricator.services.mozilla.com/D147802
2022-06-21 13:56:52 +00:00
Sean Feng
a0027872bc Bug 1770001 - Update TimingAllowCheck function to align spec updates r=necko-reviewers,dragana
Given the Fetch spec, the TAO check algorithm has been updated to
be more restricted. This patch updates the algorithm to match the
spec.

Differential Revision: https://phabricator.services.mozilla.com/D146737
2022-06-17 15:04:18 +00:00
Sean Feng
0294dfaf7a Bug 1768583 - Allow having a PerformanceResourceTiming entry for cross origin redirects r=necko-reviewers,dragana
According to the latest Fetch spec, we should generate a opaque
PerformanceResourceTiming entry for cross origin redirects, rather than
not generating it at all.

Plus the timings for cross-origin redirects won't be leaked unless all
redirects pass the TAO check.

Differential Revision: https://phabricator.services.mozilla.com/D146580
2022-06-16 14:09:31 +00:00
Tom Schuster
36f0092f90 Bug 1605305 - Consistently provide an Origin header for normal requests. r=freddyb,necko-reviewers,kershaw,robwu
This patch is more conservative for requests initiated by add-on and prefers
to send no Origin header instead of Origin: null.

Differential Revision: https://phabricator.services.mozilla.com/D147091
2022-06-15 18:30:19 +00:00
Dimi
9e6c641b2c Bug 1773043 - Remove flashblock from necko r=kershaw,necko-reviewers
Depends on D149130

Differential Revision: https://phabricator.services.mozilla.com/D149131
2022-06-15 12:55:26 +00:00
Tom Schuster
6ba489c180 Bug 1763367 - Flush HttpBaseChannel console reports using the WindowID. r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D143039
2022-05-23 13:51:58 +00:00