Commit graph

1025 commits

Author SHA1 Message Date
Ho Cheung
6df7ed2a89 Bug 1835863 - Remove ContentParent* aParent in netwerk r=manuel
`ContentParent* aParent` is unused and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D180526
2023-06-12 12:37:18 +00:00
Cristian Tuns
bc4cfd88c2 Backed out 4 changesets (bug 1837582, bug 1837153) for causing build bustages in nsGlobalWindowInner.cpp on Android CLOSED TREE
Backed out changeset e17bfa5f8959 (bug 1837153)
Backed out changeset 662b7f7504b9 (bug 1837582)
Backed out changeset 7c5fa154397d (bug 1837153)
Backed out changeset b447d95efe6e (bug 1837153)
2023-06-12 06:23:38 -04:00
Tom Schuster
61cbc9d9c9 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting with nsIChannel non-optional. r=tjr,cookie-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D180199
2023-06-12 09:48:03 +00:00
Cristina Horotan
c1f04d7bb9 Backed out changeset 4b086a7e6115 (bug 1835925) for causing wpt failures at HttpBaseChannel.cpp on a CLOSED TREE 2023-06-07 17:55:34 +03:00
Sean Feng
cca262fb5e Bug 1835925 - Expand ORB_BLOCK_INITIATOR telemetry probe to demystify OTHER r=smaug,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D179579
2023-06-07 13:11:28 +00:00
Andreas Farre
2680ac02eb Bug 1834497 - Register ORB prefs in nimbus FeatureManifest. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D178916
2023-05-31 20:30:36 +00:00
Sean Feng
f5a6348688 Bug 1833216 - Add two more telemetry probes for ORB r=farre,necko-reviewers
Add `ORB_BLOCK_REASON` to learn more about the reasoning of orb blocking in the wild.

Add ORB_BLOCK_INITIATOR to learn about the initiators. We can add more probes in the future if we want to target a specific initiator.

Differential Revision: https://phabricator.services.mozilla.com/D178102
2023-05-23 20:42:35 +00:00
Andreas Farre
97ee97f4a7 Bug 1823817 - Process cross origin security headers from nsHttpChannel::OnAuthCancelled. r=necko-reviewers,valentin
nsHttpChannel::OnAuthCancelled calls nsHttpChannel::CallOnStartRequest
directly, effectively bypassing
HttpBaseChannel::ProcessCrossOriginSecurityHeaders, which is needed to
get CORP handling right.

Differential Revision: https://phabricator.services.mozilla.com/D177778
2023-05-16 14:55:23 +00:00
Andreas Farre
1125476080 Bug 1828375 - Do gradual ORB transition. r=sefeng,necko-reviewers
Add a separate check for spec breaking allows of certain MIME
types. Having this separated out means that we can make the rest of
the implementation behave exactly like spec.

Some tradeoffs that we need in the current state are:

* Allowing "application/dash+xml"
* Allowing "application/vnd.apple.mpegurl"
* Allowing "text/vtt"
* Allow all MIME types beginning with "audio/mpeg"
* Allow "text/plain" when there is a no-sniff header.

Differential Revision: https://phabricator.services.mozilla.com/D176821
2023-05-10 14:35:52 +00:00
Andreas Farre
476835e1c7 Bug 1823877 - Part 1: Filter opaque results from fetch() in the parent for ORB. r=sefeng,smaug,necko-reviewers,edenchuang,valentin
We make sure to not send any data to the content process in case of
fetching an opaque resource. This is way to remain more web
compatible, but is also in conflict with the ORB specification.

Differential Revision: https://phabricator.services.mozilla.com/D173454
2023-05-10 14:35:52 +00:00
Kershaw Chang
8f95e3fca6 Bug 1808323 - Add telemetry for the page load time and the time to first paint for sites that supports Early Hints response, r=manuel,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D165966
2023-05-02 08:08:44 +00:00
sunil mayya
ddaba9c7bb Bug 1823502 - do not drop auth header for HSTS and internal redirects. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D173523
2023-03-28 00:56:23 +00:00
Sean Feng
3591a80eeb Bug 1823921 - Filter out some types of requests from the ORB_DID_EVER_BLOCK_RESPONSE probe r=farre,necko-reviewers,kershaw
Content processes can do nothing to the responses of nsIContentPolicy::TYPE_BEACON,
nsIContentPolicy::TYPE_PING and nsIContentPolicy::TYPE_CSP_REPORT requests, so filter
them out of the ORB_DID_EVER_BLOCK_RESPONSE probe to not worry them for
web compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D173292
2023-03-23 13:22:19 +00:00
Sean Feng
10b143a80e Bug 1804086 - Allow document charset to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Depends on D172490

Differential Revision: https://phabricator.services.mozilla.com/D172491
2023-03-22 14:21:40 +00:00
Sean Feng
b32e4554a9 Bug 1804086 - Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Differential Revision: https://phabricator.services.mozilla.com/D172490
2023-03-22 14:21:39 +00:00
Noemi Erli
b4fa013c2d Backed out 3 changesets (bug 1804086) for causing failures in JSValidatorChild.cpp CLOSED TREE
Backed out changeset 12a40a80a975 (bug 1804086)
Backed out changeset 1bea9ea5e20d (bug 1804086)
Backed out changeset 00feb14e7824 (bug 1804086)
2023-03-22 03:33:43 +02:00
Sean Feng
0feaa2906c Bug 1804086 - Allow document charset to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Depends on D172490

Differential Revision: https://phabricator.services.mozilla.com/D172491
2023-03-21 22:55:08 +00:00
Sean Feng
078281d4c2 Bug 1804086 - Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Differential Revision: https://phabricator.services.mozilla.com/D172490
2023-03-21 22:55:08 +00:00
Gijs Kruitbosch
f1911aef9a Bug 1718082 - track current tab using browserId instead of top browsing context id for network prioritization purposes, r=nika,mconley,necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D171646
2023-03-13 17:32:08 +00:00
Sean Feng
e62365a145 Bug 1820192 - Add a hint of ORB blocking to developer console r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D172263
2023-03-13 15:39:38 +00:00
Butkovits Atila
ac029a126f Backed out changeset 188db2f94c8e (bug 1809931) for causing failures at test_fetch_event.html. CLOSED TREE 2023-03-01 17:39:38 +02:00
Andreas Farre
4b69c300a0 Bug 1809931 - Explicitly check for top-level loads when running ORB. r=sefeng,necko-reviewers,valentin
With HTTPS-First top-level loads can have a loading principal, so we
need to explicitly check the load info if we're doing a top-level
load.

Differential Revision: https://phabricator.services.mozilla.com/D171315
2023-03-01 14:52:25 +00:00
Sean Feng
27084394a5 Bug 1809518 - Special case the HTTPS Only timeout request to make it bypass ORB r=farre,necko-reviewers
This particular request is used to identify the potential timeout issue
for HTTPS only requests. ORB doesn't need to block this request.

Differential Revision: https://phabricator.services.mozilla.com/D170251
2023-02-28 19:46:11 +00:00
Sean Feng
84f1835811 Bug 1809518 - Allow requests that are maded by devtools bypass ORB r=farre,necko-reviewers
Devtools use its own mainThreadFetch to fetch resources when it's
needed. For example, fetching the content of a source file. Importantly,
these request use `TYPE_OTHER` which could be blocked by ORB. Having
ORB block requests coming from devtools break some of it
functionalities.

Differential Revision: https://phabricator.services.mozilla.com/D170250
2023-02-28 19:46:11 +00:00
Marian-Vasile Laza
c39ea4a713 Backed out 15 changesets (bug 1809518) for wpt failures on navigation-headers.https.html.
Backed out changeset d245efcf2257 (bug 1809518)
Backed out changeset 3f29ad282371 (bug 1809518)
Backed out changeset 8f77fb0ddfef (bug 1809518)
Backed out changeset b1f9dcd5f147 (bug 1809518)
Backed out changeset eda8f3ef3fdb (bug 1809518)
Backed out changeset 85f4c2ca24e0 (bug 1809518)
Backed out changeset 92b774c122c9 (bug 1809518)
Backed out changeset b6e6065c79ff (bug 1809518)
Backed out changeset 724a5c7bba6a (bug 1809518)
Backed out changeset 224ccbc28c49 (bug 1809518)
Backed out changeset cc88d68be920 (bug 1809518)
Backed out changeset c02d3f25c880 (bug 1809518)
Backed out changeset 597cb423049d (bug 1809518)
Backed out changeset ae56071e154f (bug 1809518)
Backed out changeset 563403090c7f (bug 1809518)
2023-02-28 20:42:23 +02:00
Joshua Marshall
b0c912c415 Bug 1645054 - Disable/purge service workers when dom.serviceWorkers.enabled is false r=dom-worker-reviewers,necko-reviewers,asuth,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D167550
2023-02-28 15:57:55 +00:00
Sean Feng
bfba867972 Bug 1809518 - Special case the HTTPS Only timeout request to make it bypass ORB r=farre,necko-reviewers
This particular request is used to identify the potential timeout issue
for HTTPS only requests. ORB doesn't need to block this request.

Differential Revision: https://phabricator.services.mozilla.com/D170251
2023-02-28 15:28:04 +00:00
Sean Feng
702eb65533 Bug 1809518 - Allow requests that are maded by devtools bypass ORB r=farre,necko-reviewers
Devtools use its own mainThreadFetch to fetch resources when it's
needed. For example, fetching the content of a source file. Importantly,
these request use `TYPE_OTHER` which could be blocked by ORB. Having
ORB block requests coming from devtools break some of it
functionalities.

Differential Revision: https://phabricator.services.mozilla.com/D170250
2023-02-28 15:28:04 +00:00
sunil mayya
3ae22e6d6f Bug 1817980 - replace ReferrerInfo::IsCrossOriginRequest with nsScriptSecurityManager::CheckSameOriginURI for determining cross-origin redirects. r=necko-reviewers,valentin
Since Bug 1802086, we strip authentication headers when redirected to a cross-origin page. However, the api   ReferrerInfo::IsCrossOriginRequest  used for determining whether a request is cross-origin cannot be used as it compares the triggering principal's uri with the redirected channel's uri. This comparison might sometimes yield to false positives.
For e.g consider the following scenario:
1. Load `https://example.org/` and send the following fetch request from browser console
```
fetch("https://test.com/some_location", {
  "headers": {
    "Authorization": "Token foo"
  }
});
```
2. Server responds with  a redirect to https://test.com/another_location

In the above scenario, the api ReferrerInfo::IsCrossOriginRequest  will yield the above request as cross origin since the triggering principal uri here is example.com. Hence, this will be treated as cross-origin redirect resulting in removal of auth headers.

Thus ReferrerInfo::IsCrossOriginRequest  has been replaced with nsScriptSecurityManager::CheckSameOriginURI  where we directly compare the origins for the two requests.

Differential Revision: https://phabricator.services.mozilla.com/D170868
2023-02-28 12:06:36 +00:00
Csoregi Natalia
47428da2d3 Backed out 8 changesets (bug 1809518) for causing fetch related failures. CLOSED TREE
Backed out changeset b448bddfa364 (bug 1809518)
Backed out changeset ce3a811a4522 (bug 1809518)
Backed out changeset f5add471e7f9 (bug 1809518)
Backed out changeset d2e6d1734eec (bug 1809518)
Backed out changeset 2299a5bdc7a9 (bug 1809518)
Backed out changeset 3eb92dc5aac9 (bug 1809518)
Backed out changeset 3061e4fbf237 (bug 1809518)
Backed out changeset 678468cb98cd (bug 1809518)
2023-02-23 04:33:37 +02:00
Sean Feng
4cfd97b195 Bug 1809518 - Special case the HTTPS Only timeout request to make it bypass ORB r=farre,necko-reviewers
This particular request is used to identify the potential timeout issue
for HTTPS only requests. ORB doesn't need to block this request.

Differential Revision: https://phabricator.services.mozilla.com/D170251
2023-02-22 20:17:04 +00:00
Sean Feng
7d217e6674 Bug 1809518 - Allow requests that are maded by devtools bypass ORB r=farre,necko-reviewers
Devtools use its own mainThreadFetch to fetch resources when it's
needed. For example, fetching the content of a source file. Importantly,
these request use `TYPE_OTHER` which could be blocked by ORB. Having
ORB block requests coming from devtools break some of it
functionalities.

Differential Revision: https://phabricator.services.mozilla.com/D170250
2023-02-22 20:17:03 +00:00
Cristian Tuns
ef9fa152c1 Backed out 8 changesets (bug 1809518) for causing build bustages on JSOracleChild.h CLOSED TREE
Backed out changeset 1057c5d5a0a5 (bug 1809518)
Backed out changeset 1ddffd079624 (bug 1809518)
Backed out changeset 3f43f1cd3e8b (bug 1809518)
Backed out changeset 16bd31105745 (bug 1809518)
Backed out changeset d86c04497104 (bug 1809518)
Backed out changeset 25a5bf657f5c (bug 1809518)
Backed out changeset bf67b8c14aa0 (bug 1809518)
Backed out changeset 5cc0653b2072 (bug 1809518)
2023-02-22 12:20:40 -05:00
Sean Feng
0c077ca87a Bug 1809518 - Special case the HTTPS Only timeout request to make it bypass ORB r=farre,necko-reviewers
This particular request is used to identify the potential timeout issue
for HTTPS only requests. ORB doesn't need to block this request.

Differential Revision: https://phabricator.services.mozilla.com/D170251
2023-02-22 14:07:48 +00:00
Sean Feng
a72b4cc41c Bug 1809518 - Allow requests that are maded by devtools bypass ORB r=farre,necko-reviewers
Devtools use its own mainThreadFetch to fetch resources when it's
needed. For example, fetching the content of a source file. Importantly,
these request use `TYPE_OTHER` which could be blocked by ORB. Having
ORB block requests coming from devtools break some of it
functionalities.

Differential Revision: https://phabricator.services.mozilla.com/D170250
2023-02-22 14:07:48 +00:00
Marian-Vasile Laza
3b94af9f92 Backed out changeset 06c46706c118 (bug 1645054) for marionette failures. CLOSED TREE 2023-02-16 18:21:05 +02:00
Joshua Marshall
f123641ebe Bug 1645054 - Disable/purge service workers when dom.serviceWorkers.enabled is false r=dom-worker-reviewers,necko-reviewers,asuth,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D167550
2023-02-16 14:12:39 +00:00
Andreas Farre
e235fbcc4f Bug 1812051 - Add telemetry to count if ORB is ever used. r=smaug,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D169417
2023-02-16 10:07:01 +00:00
Kershaw Chang
179c96d6fb Bug 1755660 - Test progress notification with and without proxy r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D153062
2023-02-09 16:55:09 +00:00
Yulia Startsev
1c5ad3e91d Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2023-01-18 13:46:33 +00:00
sunil mayya
cb305f0962 Bug 1802086 - remove auth header from redirected cross-origin requests. r=necko-reviewers,smaug,valentin
The change also updates WPT based on the discussions here https://github.com/web-platform-tests/wpt/pull/37145/files#r1042166622

Differential Revision: https://phabricator.services.mozilla.com/D163904
2023-01-17 16:13:51 +00:00
Andreas Farre
dce97430cc Bug 1778135 - Add profile marker for ORB safelist check. r=necko-reviewers,smaug,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164569
2023-01-17 14:03:41 +00:00
Andreas Farre
5a0687b02f Bug 1804638 - Add telemetry probes to measure ORB JavaScript performance. r=necko-reviewers,smaug,sefeng,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164568
2023-01-17 14:03:41 +00:00
Nika Layzell
852d02ec16 Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Sandor Molnar
41b78439d0 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell
8d118308de Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Andreas Farre
ead5ce5973 Bug 1810544 - OpaqueResponse::Alllow -> OpaqueResponse::Allow. r=smaug,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D166927
2023-01-16 19:17:14 +00:00
Sandor Molnar
8f39acfaf1 Backed out 2 changesets (bug 1804638, bug 1778135) for causing build bustage in netwerk/protocol/http/OpaqueResponseUtils.cpp CLOSED TREE
Backed out changeset 0fd928c03e0f (bug 1778135)
Backed out changeset abafc3718310 (bug 1804638)
2023-01-16 21:59:15 +02:00
Andreas Farre
e2cdc7e8c3 Bug 1778135 - Add profile marker for ORB safelist check. r=necko-reviewers,smaug,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164569
2023-01-16 15:46:21 +00:00
Andreas Farre
03a7b88b41 Bug 1804638 - Add telemetry probes to measure ORB JavaScript performance. r=necko-reviewers,smaug,sefeng,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164568
2023-01-16 15:46:21 +00:00
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