Commit Graph

1050 Commits

Author SHA1 Message Date
Thomas Wisniewski
35368d7f72 Bug 1800443 - Support the contentType attribute of the Resource Timing API, and have it and the encoded/decoded body size use the CORS check rather than TAO; r=sefeng,valentin,webidl,necko-reviewers,saschanaz,emilio
Differential Revision: https://phabricator.services.mozilla.com/D208965
2024-06-13 13:46:05 +00:00
Noemi Erli
4e8a6e5c2f Backed out changeset f24d04943626 (bug 1800443) for causing bustages in nsITimedChannel.h 2024-06-12 21:17:16 +03:00
Thomas Wisniewski
53aa94d1a5 Bug 1800443 - Support the contentType attribute of the Resource Timing API, and have it and the encoded/decoded body size use the CORS check rather than TAO; r=sefeng,valentin,webidl,necko-reviewers,saschanaz,emilio
Differential Revision: https://phabricator.services.mozilla.com/D208965
2024-06-12 17:03:13 +00:00
Manuel Bucher
a08e769765 Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects when redirecting to different query parameters r=necko-reviewers,kershaw,simonf,maltejur
This changes where the IsUpgradeDowngradeEndlessLoop check triggers.
Before this patch, it triggered during the redirect caused by the https
upgrade. With this patch, it triggers during the downgrade for http
redirects. META and JS redirect are still detected during upgrade.
This should be fixed as a follow up (See Bug 1896691).
Downgrade in this context means same url, except with the scheme http
instead of https.

Different query parameters normally lead to different responses by web servers.
Don't consider the '#ref' part of the uri, because it doesn't get send to
the server and therefore can't change the server response.

We can't use the redirect chain anymore, because the query parameters
are trimmed since Bug 1715785.

This also removes the config option dom.security.https_only_check_path_upgrade_downgrade_endless_loop,
because it adds unnecessary complexity. Removing it for this patch is
easier.

https-only, https-first and httpssvc_https_upgrade tests had to be
modified, because they depended on the incorrect handling of query
strings in loop detection.

Differential Revision: https://phabricator.services.mozilla.com/D193672
2024-06-10 17:09:57 +00:00
Valentin Gosu
4dfae4ebeb Bug 1885308 - Make HttpBaseChannel::SetDocshellUserAgentOverride use eVarietyRequestEnforceDefault for the header. r=asuth,necko-reviewers,jesup
This variety is specifically used to make the User-Agent header be treated as
a default request header, but it wasn't used properly of the UA override.

This caused the header to be copied by CopyNonDefaultHeaderVisitor.

Differential Revision: https://phabricator.services.mozilla.com/D210478
2024-06-10 08:56:47 +00:00
Tamas Szentpeteri
15e95dbb72 Backed out changeset b234ba179483 (bug 1747230) for causing mochitest failures on browser_target_blank.js. CLOSED TREE 2024-06-06 19:51:33 +03:00
Manuel Bucher
c174df9179 Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects when redirecting to different query parameters r=necko-reviewers,kershaw,simonf,maltejur
This changes where the IsUpgradeDowngradeEndlessLoop check triggers.
Before this patch, it triggered during the redirect caused by the https
upgrade. With this patch, it triggers during the downgrade for http
redirects. META and JS redirect are still detected during upgrade.
This should be fixed as a follow up (See Bug 1896691).
Downgrade in this context means same url, except with the scheme http
instead of https.

Different query parameters normally lead to different responses by web servers.
Don't consider the '#ref' part of the uri, because it doesn't get send to
the server and therefore can't change the server response.

We can't use the redirect chain anymore, because the query parameters
are trimmed since Bug 1715785.

This also removes the config option dom.security.https_only_check_path_upgrade_downgrade_endless_loop,
because it adds unnecessary complexity. Removing it for this patch is
easier.

https-only, https-first and httpssvc_https_upgrade tests had to be
modified, because they depended on the incorrect handling of query
strings in loop detection.

Differential Revision: https://phabricator.services.mozilla.com/D193672
2024-06-06 15:04:47 +00:00
Kershaw Chang
c3f3fa63f7 Bug 1898191 - Remove setWaitForHTTPSSVCRecord, r=necko-reviewers,valentin
We don't need it anymore.

Depends on D211750

Differential Revision: https://phabricator.services.mozilla.com/D211751
2024-05-28 20:06:17 +00:00
Sean
a18c979054 Bug 1894288 - Remove network.fetch.redirect.stripAuthHeader and network.http.redirect.stripAuthHeader prefs r=sunil,edgul,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D209393
2024-05-22 15:10:48 +00:00
Cathie Chen
bc1d7fc121 Bug 1896150 - Add RenderBlockingStatusType to the PerformanceResourceTiming Interface, r=emilio,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D210053
2024-05-15 12:57:05 +00:00
Julian Descottes
cc5602733a Bug 1895198 - Add ExplicitSetUploadStreamLength to HttpChannelChild and move LoadWasOpened assert r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D209521
2024-05-06 12:00:46 +00:00
Julian Descottes
50a7f82406 Bug 1892440 - Expose RequestObserversCalled attribute in nsIHttpChannel r=valentin,necko-reviewers
For WebDriver BiDi network interception we need to be able to modify the request as late as possible.
This changeset exposes RequestObserversCalled to JS so that we can update it from the webdriver bidi codebase.

Differential Revision: https://phabricator.services.mozilla.com/D208011
2024-04-19 18:50:18 +00:00
Randell Jesup
c7ddeb74ea Bug 1871963: Implement zstd content-encoding support r=necko-reviewers,valentin,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D205109
2024-04-09 15:26:46 +00:00
Tamas Szentpeteri
768c09fff7 Backed out 3 changesets (bug 1871963) for causing dt failures on browser_net_copy_as_powershell.js. CLOSED TREE
Backed out changeset 94e286542c9d (bug 1871963)
Backed out changeset dc2ad0369b86 (bug 1871963)
Backed out changeset 9fb8ccb2f305 (bug 1871963)
2024-04-09 17:24:37 +03:00
Randell Jesup
fa0d878745 Bug 1871963: Implement zstd content-encoding support r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D205109
2024-04-09 12:31:56 +00:00
Benjamin VanderSloot
64faef2c8d Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-04-02 18:53:25 +00:00
Cristian Tuns
16ac4d3300 Backed out 6 changesets (bug 1876574, bug 1876575) for causing multiple failures in TestGetPrincipalCookieBehavior5 CLOSED TREE
Backed out changeset f00e9fde550f (bug 1876575)
Backed out changeset ca1c6f8819f7 (bug 1876575)
Backed out changeset d65ac05bd9f8 (bug 1876575)
Backed out changeset 5dcfe3aa8497 (bug 1876575)
Backed out changeset 9ae9252761ac (bug 1876575)
Backed out changeset 704e94d28ad7 (bug 1876574)
2024-04-02 09:58:52 -04:00
Benjamin VanderSloot
149d4f6d47 Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-04-02 12:50:00 +00:00
Stanca Serban
d963aee96b Backed out 6 changesets (bug 1876574, bug 1876575) for causing multiple failures. CLOSED TREE
Backed out changeset 8c7a9f405031 (bug 1876575)
Backed out changeset 49739f9ec590 (bug 1876575)
Backed out changeset 1c49f0c3b677 (bug 1876575)
Backed out changeset 1ca7a0f27bc0 (bug 1876575)
Backed out changeset bfa9862e3480 (bug 1876575)
Backed out changeset 58576ed7eb22 (bug 1876574)
2024-03-29 20:52:30 +02:00
Benjamin VanderSloot
13ffd24df0 Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-03-29 17:12:12 +00:00
Sandor Molnar
62e4773a7a Backed out 6 changesets (bug 1876575, bug 1876574) for causing build bustages @ toolkit/components/resistfingerprinting/nsRFPService.cpp CLOSED TREE
Backed out changeset 455ce831c73c (bug 1876575)
Backed out changeset 4fa3fbf3a3ae (bug 1876575)
Backed out changeset ac4c41cb3b67 (bug 1876575)
Backed out changeset 15e06d10788e (bug 1876575)
Backed out changeset dcd6bbea816a (bug 1876575)
Backed out changeset cc547125fda9 (bug 1876574)
2024-03-29 16:29:47 +02:00
Benjamin VanderSloot
0cb84432a5 Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-03-29 13:11:26 +00:00
Randell Jesup
296d08ac73 Bug 1356686 - Make InterceptFailedOnStop support nsIThreadRetargetableStreamListener r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D203148
2024-03-19 17:27:22 +00:00
Sandor Molnar
36dcd21ffb Backed out 4 changesets (bug 1356686) for causing build bustages @ netwerk/protocol/http/HttpChannelChild.cpp CLOSED TREE
Backed out changeset 63dc52c69902 (bug 1356686)
Backed out changeset 6e9726c26d07 (bug 1356686)
Backed out changeset 3b150d676b31 (bug 1356686)
Backed out changeset 54754a50d992 (bug 1356686)
2024-03-19 08:29:08 +02:00
Randell Jesup
a6b95d0ec8 Bug 1356686 - Make InterceptFailedOnStop support nsIThreadRetargetableStreamListener r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D203148
2024-03-18 20:04:00 +00:00
sunil mayya
c99b75b76e Bug 1874132 - remove auth headers from preflight request for cross origin requests. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D204608
2024-03-18 08:48:10 +00:00
Valentin Gosu
6277096c20 Bug 1884645 - Add NS_HTTP_ON_BEFORE_STOP_REQUEST_TOPIC r=necko-reviewers,kershaw
This notification would be sent by HttpChannelChild before
calling onStopRequest for a channel.

This patch also updates some comments regarding the on stop topic
which referenced the non-existent http-on-stop-connect

Differential Revision: https://phabricator.services.mozilla.com/D204482
2024-03-13 11:50:06 +00:00
Peter Van der Beken
9e9199880e Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-02 07:50:25 +00:00
Natalia Csoregi
10b9ceb789 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
e0fa109cb0 Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-01 14:31:15 +00:00
Tim Huang
78b408e525 Bug 1849864 - Don't recalculate the userAgent header if it has been modified. r=tjr,jesup,necko-reviewers,devtools-reviewers
The userAgent header can be modified in several ways, such as using the
header field to set a custom userAgent header for a fetch request. We
want to preserve the custom header, so we shouldn't recalculate the
userAgent header if it's been overridden after the channel was created.
Otherwise, the custom header won't work.

Differential Revision: https://phabricator.services.mozilla.com/D197655
2024-01-17 13:18:21 +00:00
Malte Juergens
70a0194f1d Bug 1857894 - Recalculate referrer based on original referrer after non-HSTS HTTPS upgrade r=necko-reviewers,freddyb,kershaw
Per fetch spec [1], we should perform CSP upgrade-insecure-requests and mixed
content upgrades before determining the referrer, while HSTS upgrades happen
after the referrer is determined. In our implementation, we determine the
referrer before all the upgrades, so we need to recalculate the referrer
after we upgrade through anything but HSTS.

[1] https://fetch.spec.whatwg.org/#main-fetch

Differential Revision: https://phabricator.services.mozilla.com/D193417
2024-01-17 09:36:53 +00:00
Iulian Moraru
917fe8ab46 Backed out 2 changesets (bug 1849864) for causing multiple failures. CLOSED TREE
Backed out changeset c57d859580d0 (bug 1849864)
Backed out changeset 8a5a6b997e2a (bug 1849864)
2024-01-16 19:39:56 +02:00
Tim Huang
527020d6ec Bug 1849864 - Don't recalculate the userAgent header if it has been modified. r=tjr,jesup,necko-reviewers,devtools-reviewers
The userAgent header can be modified in several ways, such as using the
header field to set a custom userAgent header for a fetch request. We
want to preserve the custom header, so we shouldn't recalculate the
userAgent header if it's been overridden after the channel was created.
Otherwise, the custom header won't work.

Differential Revision: https://phabricator.services.mozilla.com/D197655
2024-01-16 16:06:34 +00:00
Tom Schuster
8747c80621 Bug 1871581 - Add missing (but implicitly used) ExtContentPolicy::TYPE_WEB_IDENTITY. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D197190
2024-01-03 10:54:12 +00:00
Sean Feng
f6a956ebb1 Bug 1722322 - Fix two bugs in nsContentSecurityManager::GetSerializedOrigin r=necko-reviewers,dragana
The first bug is according to https://fetch.spec.whatwg.org/#serializing-a-request-origin,
the algorithm should return "null" if the request has a redirected-tainted origin.

The second bug is the comparison of whether this is a cross origin redirect missed
the `not operator`.

Differential Revision: https://phabricator.services.mozilla.com/D151078
2023-11-02 20:53:35 +00:00
Sandor Molnar
d23e2827b7 Backed out 7 changesets (bug 1722322) for causing bp-nu bustages
Backed out changeset 0ebd32e273b8 (bug 1722322)
Backed out changeset 7a75717f127c (bug 1722322)
Backed out changeset c2a6440a83d7 (bug 1722322)
Backed out changeset 9955756855bd (bug 1722322)
Backed out changeset 37fccb407777 (bug 1722322)
Backed out changeset f52b1f28f753 (bug 1722322)
Backed out changeset 0121c8cf5d2f (bug 1722322)
2023-11-02 21:27:24 +02:00
Sean Feng
69d3e0bcbb Bug 1722322 - Fix two bugs in nsContentSecurityManager::GetSerializedOrigin r=necko-reviewers,dragana
The first bug is according to https://fetch.spec.whatwg.org/#serializing-a-request-origin,
the algorithm should return "null" if the request has a redirected-tainted origin.

The second bug is the comparison of whether this is a cross origin redirect missed
the `not operator`.

Differential Revision: https://phabricator.services.mozilla.com/D151078
2023-11-02 17:04:46 +00:00
sunil mayya
d424ddbf03 Bug 1851992 - move assignment of mTransferSize,mEncodedBodySize from HttpChannelChild::OnStopRequest to HttpChannelChild::OnStopRequest::ProcessOnStopRequest. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D191291
2023-10-27 13:30:13 +00:00
Narcis Beleuzu
a71d185ff5 Backed out 6 changesets (bug 1851992) for DT failure on browser_net_image_cache.js . CLOSED TREE
Backed out changeset 3ceaf46f8f55 (bug 1851992)
Backed out changeset c9d322362e22 (bug 1851992)
Backed out changeset 673df3f83249 (bug 1851992)
Backed out changeset 46e18c56dd39 (bug 1851992)
Backed out changeset f9f9143ac713 (bug 1851992)
Backed out changeset 38c40d735ab7 (bug 1851992)
2023-10-24 13:16:40 +03:00
sunil mayya
17d13fc796 Bug 1851992 - move assignment of mTransferSize,mEncodedBodySize from HttpChannelChild::OnStopRequest to HttpChannelChild::OnStopRequest::ProcessOnStopRequest. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D191291
2023-10-24 01:48:11 +00:00
Sean Feng
35d0402b73 Bug 1852870 - Make devtools stop decompress decompressed content r=farre,ochameau,necko-reviewers,devtools-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D188499
2023-10-05 18:51:26 +00:00
Randell Jesup
4a7d562b75 Bug 1848833: Clean up mRedirectedCacheKeys r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D188744
2023-09-27 02:50:33 +00:00
sunil mayya
b941c835f5 Bug 1820807 - redirect channel for auth retries. r=necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D182698
2023-09-25 21:14:17 +00:00
Cristian Tuns
63915665f2 Backed out 2 changesets (bug 1820807) for causing leak failures CLOSED TREE
Backed out changeset 4e90d1ca661c (bug 1820807)
Backed out changeset 115ae91a6425 (bug 1820807)
2023-09-25 11:35:40 -04:00
sunil mayya
5df3d0b34d Bug 1820807 - redirect channel for auth retries. r=necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D182698
2023-09-25 09:32:17 +00:00
Cosmin Sabou
f34ade9ad0 Backed out 3 changesets (bug 1820807, bug 1853025, bug 1848763) for causing frequent network-related startup crashes (bug 1853231). a=backout
Backed out changeset 92d80b858050 (bug 1848763)
Backed out changeset c08cba545d2c (bug 1853025)
Backed out changeset 2fae28575ca8 (bug 1820807)
2023-09-15 12:33:19 +03:00
sunil mayya
6933e8514f Bug 1820807 - redirect channel for auth retries. r=necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D182698
2023-09-13 20:11:00 +00:00
Cosmin Sabou
99c1e75ca2 Backed out changeset 11fddb3ea9c0 (bug 1820807) for causing xpcshell failures on test_proxy-failover_canceled.js. CLOSED TREE 2023-09-11 18:10:57 +03:00
sunil mayya
acc341cf9f Bug 1820807: redirect channel for auth retries. r=necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D182698
2023-09-11 13:59:51 +00:00